Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apps/bleservo: Initial commit #1320

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

m-gorecki
Copy link
Contributor

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

@apache-mynewt-bot
Copy link

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

@m-gorecki m-gorecki changed the title apps/bleservo: Initial commit. apps/bleservo: Initial commit Jan 12, 2023
@m-gorecki m-gorecki force-pushed the ble-servo branch 3 times, most recently from 9d5ad74 to 2308605 Compare February 9, 2023 09:56
@m-gorecki m-gorecki force-pushed the ble-servo branch 2 times, most recently from c4a67d7 to 484a0d9 Compare October 25, 2023 14:58

syscfg.yml contains setting definitions and overrides.

On default servo PWM channel is connected to pin 31 of nRF52840-DK board,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this syscfg instead of requireing to modify source

BLE_ROLE_PERIPHERAL: 1

# Disable unused eddystone feature.
BLE_EDDYSTONE: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a leftover, eddystone doesn't have syscfg config

BLE_EDDYSTONE: 0

# Set public device address.
BLE_LL_PUBLIC_DEV_ADDR: 0x1122aabb33cc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no god, please, no! noooo! ;-)

nRF52840-DK BLE peripheral sample with PWM servo control ability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants