L0_BlueNRG_Test_Client
Dependencies: BLE_API BLE_BlueNRG mbed
Fork of L0_BlueNRG_Test by
Diff: main.cpp
- Revision:
- 0:e0204b0e5541
- Child:
- 1:3b1c20952274
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Jul 14 14:18:53 2014 +0000 @@ -0,0 +1,38 @@ +#include "mbed.h" + +DigitalOut myled(LED1); + +#ifdef __cplusplus +extern "C" { +#endif + +#include "stm32l0xx_bluenrg_shield_bsp.h" +#include "hci.h" +#include "bluenrg_hci.h" +#include "hci_internal.h" +#include "bluenrg_hci_internal.h" + +#include <stdio.h> +#include <string.h> + +#ifdef __cplusplus + } +#endif + +#include "btle.h" + +int main() { + + btle_init(); //Init the BlueNRG Shield + + while(1) { + myled = 1; // LED is ON + wait(0.5); // 500 ms + myled = 0; // LED is OFF + wait(0.5); // 500 ms + + HCI_Process(); + User_Process();//Start Advertising + } +} +