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.

Revision:
6:23d9a99dcde0
Parent:
5:7c7220a316ed
Child:
7:63daf39f20e1
--- a/api_datatypes.h	Tue May 19 05:01:10 2015 +0000
+++ b/api_datatypes.h	Tue May 19 05:49:00 2015 +0000
@@ -1,31 +1,39 @@
 #ifndef API_DATATYPES_H
 #define API_DATATYPES_H
+/** @file api_datatypes.h
+* @brief Data structures that the API uses for responses and commands. */
 
 /** Data structure returned from Get Info command. */
 typedef struct {
- uint16_t major; /// Major version (e.g. 1)
- uint16_t minor; /// Minor version (e.g. 3)
- uint16_t patch; /// Patch version (e.g. 2)
- uint16_t build; /// Build number (e.g. 122)
- uint16_t ll_version; /// Link Layer Version
- uint8_t protocol_version; /// BGAPI Version
- uint8_t hw; /// Hardware Version
+ uint16_t major; ///< Major version (e.g. 1)
+ uint16_t minor; ///< Minor version (e.g. 3)
+ uint16_t patch; ///< Patch version (e.g. 2)
+ uint16_t build; ///< Build number (e.g. 122)
+ uint16_t ll_version; ///< Link Layer Version
+ uint8_t protocol_version; ///< BGAPI Version
+ uint8_t hw; ///< Hardware Version
 } ble_msg_system_get_info_rsp_t;
 
 
 /** Data structure passed into the Reset command. */
 typedef struct {
-    uint8_t boot_in_dfu; /// Determine whether or not to boot into Device Firmware Update (DFU) mode. 1 for booting into DFU, 0 otherwise.
+    uint8_t boot_in_dfu; ///< Determine whether or not to boot into Device Firmware Update (DFU) mode. 1 for booting into DFU, 0 otherwise.
 } ble_msg_system_reset_t;
 
+/** Data structure returned from Boot event. */
 typedef struct {
- uint16_t major; 
- uint16_t minor; 
- uint16_t patch;
- uint16_t build;
- uint16_t ll_version;
- uint8_t protocol_version;
- uint8_t hw;
+ uint16_t major; ///< Major version (e.g. 1)
+ uint16_t minor; ///< Minor version (e.g. 3)
+ uint16_t patch; ///< Patch version (e.g. 2)
+ uint16_t build; ///< Build number (e.g. 122)
+ uint16_t ll_version; ///< Link Layer Version
+ uint8_t protocol_version; ///< BGAPI Version
+ uint8_t hw; ///< Hardware Version
 } ble_msg_system_boot_evt_t;
 
+/** Data structure returned from Discover command. */
+typedef struct {
+    uint16_t result; ///< Result. Non-zero value indicates an error.
+} ble_msg_gap_discover_rsp_t;
+
 #endif
\ No newline at end of file