Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SimpleBLE-mbed-os-5
Fork of SimpleBLE-Example by
Revision 6:7c41f0ee8989, committed 2017-08-14
- Comitter:
- janjongboom
- Date:
- Mon Aug 14 12:04:30 2017 +0000
- Parent:
- 5:1e3a5f498574
- Child:
- 7:a91f887903e6
- Commit message:
- Update to mbed OS 5
Changed in this revision
--- a/SimpleBLE.lib Fri Sep 02 11:23:57 2016 +0000 +++ b/SimpleBLE.lib Mon Aug 14 12:04:30 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/mbed-x/code/SimpleBLE/#15329a3de04c +https://developer.mbed.org/teams/mbed-x/code/SimpleBLE-mbed-os-5/#450b780bb1de
--- a/main.cpp Fri Sep 02 11:23:57 2016 +0000
+++ b/main.cpp Mon Aug 14 12:04:30 2017 +0000
@@ -3,6 +3,9 @@
DigitalOut led(LED1);
+// Event queue to process BLE events in
+static EventQueue eventQueue(/* event count */ 10 * EVENTS_EVENT_SIZE);
+
// The first thing we need to do is create a SimpleBLE instance:
// * first argument is the device name
// * second is the advertisement interval in ms. (default 1000 ms.)
@@ -39,9 +42,9 @@
t.attach(updateHeartrate, 1.0f);
// here's how we kick off our loop
- ble.start();
- while (1) {
- ble.waitForEvent();
- }
+ ble.start(&eventQueue);
+
+ // optionally: run this in a separate thread (see https://developer.mbed.org/blog/entry/Simplify-your-code-with-mbed-events/)
+ eventQueue.dispatch_forever();
}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Mon Aug 14 12:04:30 2017 +0000 @@ -0,0 +1,1 @@ +https://github.com/armmbed/mbed-os/#4c256f04596179699c4f14b6863b07cc024ca9be
--- a/mbed.bld Fri Sep 02 11:23:57 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/f9eeca106725 \ No newline at end of file
--- a/nRF51822.lib Fri Sep 02 11:23:57 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#f7faad332abc
