mynewt-nimble
mynewt-nimble copied to clipboard
apps/bleservo: Initial commit
nRF52840-DK BLE peripheral sample with PWM servo control ability.
Style check summary
Our coding style is here!
apps/bleservo/src/gatt_svr.c
@@ -82,24 +82,24 @@
.type = BLE_GATT_SVC_TYPE_PRIMARY,
.uuid = &gatt_svr_svc_servo_uuid.u,
.characteristics = (struct ble_gatt_chr_def[]) { {
- /* Characteristic: servo angle*/
- .uuid = &gatt_svr_chr_servo_angle_uuid.u,
- .val_handle = &gatt_angle_val_handle,
- .access_cb = gatt_svr_chr_access_servo_angle,
- .flags = BLE_GATT_CHR_F_READ |
- BLE_GATT_CHR_F_WRITE |
- BLE_GATT_CHR_F_NOTIFY
- }, {
- /* Characteristic: servo PWM pulse duration*/
- .uuid = &gatt_svr_chr_servo_pulse_duration_uuid.u,
- .val_handle = &gatt_pulse_duration_val_handle,
- .access_cb = gatt_svr_chr_access_servo_pulse_duration,
- .flags = BLE_GATT_CHR_F_READ |
- BLE_GATT_CHR_F_WRITE |
- BLE_GATT_CHR_F_NOTIFY
- }, {
- 0, /* No more characteristics in this service */
- }, }
+ /* Characteristic: servo angle*/
+ .uuid = &gatt_svr_chr_servo_angle_uuid.u,
+ .val_handle = &gatt_angle_val_handle,
+ .access_cb = gatt_svr_chr_access_servo_angle,
+ .flags = BLE_GATT_CHR_F_READ |
+ BLE_GATT_CHR_F_WRITE |
+ BLE_GATT_CHR_F_NOTIFY
+ }, {
+ /* Characteristic: servo PWM pulse duration*/
+ .uuid = &gatt_svr_chr_servo_pulse_duration_uuid.u,
+ .val_handle = &gatt_pulse_duration_val_handle,
+ .access_cb = gatt_svr_chr_access_servo_pulse_duration,
+ .flags = BLE_GATT_CHR_F_READ |
+ BLE_GATT_CHR_F_WRITE |
+ BLE_GATT_CHR_F_NOTIFY
+ }, {
+ 0, /* No more characteristics in this service */
+ }, }
},
{