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.

Committer:
dishbreak
Date:
Sun May 17 23:24:26 2015 +0000
Revision:
1:3336b2391c80
Parent:
0:b696d6f71174
Child:
2:3ce9a31a6a7e
Completed steel thread--can send hello packet using callbacks.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dishbreak 1:3336b2391c80 1 #include "mbed.h"
dishbreak 1:3336b2391c80 2
dishbreak 1:3336b2391c80 3 typedef void (*hello_callback_t)();
dishbreak 1:3336b2391c80 4
dishbreak 1:3336b2391c80 5 class BGLib {
dishbreak 1:3336b2391c80 6
dishbreak 1:3336b2391c80 7 public:
dishbreak 1:3336b2391c80 8 BGLib(PinName tx, PinName rx, PinName rts, PinName cts);
dishbreak 1:3336b2391c80 9
dishbreak 1:3336b2391c80 10 void send_hello();
dishbreak 1:3336b2391c80 11 void set_hello_callback(hello_callback_t pCallback);
dishbreak 1:3336b2391c80 12
dishbreak 1:3336b2391c80 13 private:
dishbreak 1:3336b2391c80 14 void parse();
dishbreak 1:3336b2391c80 15 void send_bytes(uint8_t bytes[], int length);
dishbreak 1:3336b2391c80 16 Serial mSerial;
dishbreak 1:3336b2391c80 17 hello_callback_t mHelloCallback;
dishbreak 1:3336b2391c80 18
dishbreak 1:3336b2391c80 19 };