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: BLE_API mbed nRF51822
mail.cpp@0:c54bb1176cf5, 2017-03-24 (annotated)
- Committer:
- rgbetanco
- Date:
- Fri Mar 24 04:49:51 2017 +0000
- Revision:
- 0:c54bb1176cf5
testing fota for nRF51 DK
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rgbetanco | 0:c54bb1176cf5 | 1 | #include "mbed.h" |
| rgbetanco | 0:c54bb1176cf5 | 2 | #include "BLE.h" |
| rgbetanco | 0:c54bb1176cf5 | 3 | |
| rgbetanco | 0:c54bb1176cf5 | 4 | BLEDevice ble; |
| rgbetanco | 0:c54bb1176cf5 | 5 | |
| rgbetanco | 0:c54bb1176cf5 | 6 | int main(void){ |
| rgbetanco | 0:c54bb1176cf5 | 7 | ble.init(); |
| rgbetanco | 0:c54bb1176cf5 | 8 | ble.setAdvertisingInterval(1000); /* 100ms; in multiples of 0.625ms. */ |
| rgbetanco | 0:c54bb1176cf5 | 9 | ble.startAdvertising(); |
| rgbetanco | 0:c54bb1176cf5 | 10 | while(true){ |
| rgbetanco | 0:c54bb1176cf5 | 11 | ble.waitForEvent(); |
| rgbetanco | 0:c54bb1176cf5 | 12 | } |
| rgbetanco | 0:c54bb1176cf5 | 13 | } |