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:
7:63daf39f20e1
Parent:
6:23d9a99dcde0
diff -r 23d9a99dcde0 -r 63daf39f20e1 BGLib.h
--- a/BGLib.h	Tue May 19 05:49:00 2015 +0000
+++ b/BGLib.h	Tue May 19 07:30:40 2015 +0000
@@ -75,6 +75,16 @@
     * @param mode The mode that the device should do discovery in.
     */
     void ble_cmd_gap_discover(gap_discover_mode mode);
+    
+    /** Set the callback for a Discover command.
+    * @param pCallback Function pointer to the desired callback.
+    */
+    void set_ble_rsp_gap_discover(discover_callback_t pCallback);
+    
+    /** Set the callback for Scan Result events.
+    * @param pCallback Function pointer to the desired callback.
+    */
+    void set_ble_evt_gap_scan_result(scan_result_callback_t pCallback);
         
     
 private:
@@ -95,5 +105,7 @@
     get_info_callback_t mGetInfoCallback;
     boot_callback_t mBootCallback;
     timestamp_callback_t mTimestampCallback;
+    discover_callback_t mDiscoverCallback;
+    scan_result_callback_t mScanResultCallback;
     
 };
\ No newline at end of file