
Send continuous stream to mobile
Fork of pdiot-ble-notify-array by
Revision 5:b630d2a88c51, committed 2016-08-02
- Comitter:
- mbed_official
- Date:
- Tue Aug 02 09:45:20 2016 +0100
- Parent:
- 4:79e8d71aaffd
- Child:
- 6:f3e1a94366d6
- Commit message:
- Merge pull request #14 from ARMmbed/add_button_configuration
Add button configuration for BLE_Button application.
Commit copied from https://github.com/ARMmbed/mbed-os-example-ble
Changed in this revision
mbed_app.json | Show annotated file Show diff for this revision Revisions of this file |
source/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/mbed_app.json Sat Jul 30 00:00:49 2016 +0100 +++ b/mbed_app.json Tue Aug 02 09:45:20 2016 +0100 @@ -1,13 +1,28 @@ { + "config": { + "ble_button_pin_name": { + "help": "The pin name used as button in this application", + "macro_name": "BLE_BUTTON_PIN_NAME", + "required": true + } + }, "target_overrides": { + "NRF51_DK": { + "ble_button_pin_name": "BUTTON1" + }, + "NRF52_DK": { + "ble_button_pin_name": "BUTTON1" + }, "K64F": { "target.features_add": ["BLE"], "target.extra_labels_add": ["ST_BLUENRG"], - "target.macros_add": ["IDB0XA1_D13_PATCH"] + "target.macros_add": ["IDB0XA1_D13_PATCH"], + "ble_button_pin_name": "SW2" }, "NUCLEO_F401RE": { "target.features_add": ["BLE"], - "target.extra_labels_add": ["ST_BLUENRG"] + "target.extra_labels_add": ["ST_BLUENRG"], + "ble_button_pin_name": "USER_BUTTON" } } }
--- a/source/main.cpp Sat Jul 30 00:00:49 2016 +0100 +++ b/source/main.cpp Tue Aug 02 09:45:20 2016 +0100 @@ -21,7 +21,7 @@ #include "ButtonService.h" DigitalOut led1(LED1, 1); -InterruptIn button(BUTTON1); +InterruptIn button(BLE_BUTTON_PIN_NAME); static EventQueue eventQueue( /* event count */ 10 * /* event size */ 32