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.
File content as of revision 6:23d9a99dcde0:
#include "api_datatypes.h" #ifndef CALLBACKS_H #define CALLBACKS_H /** @file callbacks.h * @brief Definitions of function callbacks that BGLib will invoke. * In order to take advantage of these callbacks, use the corresponding setter in the BGLib API. */ /** @brief Function pointer for Hello response handler. * This is a pointer to a callback for the Hello response. It should point to a function that takes no arguments. */ typedef void (*hello_callback_t)(); /** Function pointer for Get Info response handler. * @param ble_msg_system_get_info_rsp_t A data structure containing the response. */ typedef void (*get_info_callback_t)(ble_msg_system_get_info_rsp_t); /** Function pointer for System Boot event handler. * @param ble_msg_system_boot_evt_t A data structure containing the data from the System Boot event. */ typedef void (*boot_callback_t)(ble_msg_system_boot_evt_t); /** Function pointer for timestamping. This is a function that is intended to run whenever there is <em>any</em> data available on the UART. */ typedef void (*timestamp_callback_t)(); /** Function pointer for Discover response handler. * @param ble_msg_gap_discover_rsp_t A data structure containing the response. */ typedef void (*discover_callback_t)(ble_msg_gap_discover_rsp_t); #endif