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.
This example is a fork of the following mbed-os example:
https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-ble-LED/
Please read the documentation in this page.
Revision 11:7404978b24e7, committed 2016-10-24
- Comitter:
- mbed_official
- Date:
- Mon Oct 24 11:15:38 2016 +0100
- Parent:
- 10:47ee5a59dca0
- Child:
- 12:77b2e6cc1ebb
- Commit message:
- Merge pull request #32 from ARMmbed/oob
Sync with mbed OS 5.2 OOB repo
Commit copied from https://github.com/ARMmbed/mbed-os-example-ble
Changed in this revision
--- a/mbed-events.lib Wed Oct 05 05:16:03 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://github.com/ARMmbed/mbed-events.git#6be60bf880c11a0beafcc2064bf467f8d897529a
--- a/mbed-os.lib Wed Oct 05 05:16:03 2016 +0100 +++ b/mbed-os.lib Mon Oct 24 11:15:38 2016 +0100 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#a6f3fd1a60d5df59246d7caf3f108c4d34e1808e +https://github.com/ARMmbed/mbed-os/#1d875083b701a5e530f97ba615e2c0d2060d09e5
--- a/source/main.cpp Wed Oct 05 05:16:03 2016 +0100
+++ b/source/main.cpp Mon Oct 24 11:15:38 2016 +0100
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <mbed-events/events.h>
+#include <events/mbed_events.h>
#include <mbed.h>
#include "ble/BLE.h"
#include "LEDService.h"
@@ -98,20 +98,18 @@
void scheduleBleEventsProcessing(BLE::OnEventsToProcessCallbackContext* context) {
BLE &ble = BLE::Instance();
- eventQueue.post(Callback<void()>(&ble, &BLE::processEvents));
+ eventQueue.call(Callback<void()>(&ble, &BLE::processEvents));
}
int main()
{
- eventQueue.post_every(500, blinkCallback);
+ eventQueue.call_every(500, blinkCallback);
BLE &ble = BLE::Instance();
ble.onEventsToProcess(scheduleBleEventsProcessing);
ble.init(bleInitComplete);
- while (true) {
- eventQueue.dispatch();
- }
+ eventQueue.dispatch_forever();
return 0;
}