mynewt-nimble icon indicating copy to clipboard operation
mynewt-nimble copied to clipboard

apps/bleservo: Initial commit

Open m-gorecki opened this issue 2 years ago • 1 comments

nRF52840-DK BLE peripheral sample with PWM servo control ability.

m-gorecki avatar Aug 11 '22 13:08 m-gorecki

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 */
+                                                         }, }
     },
 
     {

apache-mynewt-bot avatar Sep 29 '22 08:09 apache-mynewt-bot