Partial implementation of BlueGiga's BGAPI for use with the BLE112/3 modules over UART.
Hi there! I recently started using BLE112 modules with the mbed LPC1768 MCU, and I realized there was no implementation of BlueGiga's BGAPI available for mbed. This library implements only a few commands, but if you're looking to get started, this is a good place to look.
This was developed against BGAPI v1.3.2. I make no guarantees as to how well it will work with newer revisions of the software.
Diff: BGLib.h
- Revision:
- 3:8f43af513d87
- Parent:
- 2:3ce9a31a6a7e
- Child:
- 4:21eee6881dac
--- a/BGLib.h Mon May 18 01:16:52 2015 +0000 +++ b/BGLib.h Mon May 18 05:49:21 2015 +0000 @@ -49,12 +49,22 @@ */ void set_ble_rsp_system_get_info(get_info_callback_t pCallback); + /** Send a Reset command to the device. */ + void ble_cmd_system_reset(ble_msg_system_reset_t args); + + /** Set the callback for a Boot event. Invoked when the BLE112 is powered on or reset. + * @param pCallback Function pointer to the desired callback. + */ + void set_ble_evt_system_boot(boot_callback_t pCallback); + private: void parse(); void send_bytes(uint8_t bytes[], int length); + Serial mSerial; hello_callback_t mHelloCallback; get_info_callback_t mGetInfoCallback; + boot_callback_t mBootCallback; }; \ No newline at end of file