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 X_NUCLEO_IDB0XA1 mbed
Fork of N06_NAND by
Diff: main.cpp
- Revision:
- 25:339931243be4
- Parent:
- 23:2e73c391bb12
diff -r 359e85e758c3 -r 339931243be4 main.cpp
--- a/main.cpp	Sun Jan 08 23:16:12 2017 +0000
+++ b/main.cpp	Sat May 19 14:09:24 2018 +0000
@@ -26,21 +26,19 @@
       advertise(o);                    // resume advertising on disconnection
    }
    
-   void cbSetup(O&o)                   // setup calback (after BLE init)
+   int main(void)
    {
+      O o;                             // Oh-ohh - our Blob (BLuetooth OBject)
+      init(o);                         // init BLE base layer, always do first
+
       onDisconnect(o,cbDisconnect);    // setup disconnection callback
       onWritten(o,cbWritten);          // setup data written callback
       
       device(o,"NAND Gate");           // setup device name
-      name(o,"N04#1.0 NAND");          // add name to device
+      name(o,"N06#2.0 NAND");          // add name to device
       enroll(o,tiny);                  // enroll (register) TINY service
 
       advertise(o,"C:ng",100);         // start advertising @ 100 msec interval
-   }
 
-   int main(void)
-   {
-      O o;                             // Oh-ohh - our Blob (BLuetooth OBject)
-      init(o,cbSetup);                 // init BLE base layer, always do first
       for(;;) sleep(o);                // low power waiting for BLE events 
    }
\ No newline at end of file
    