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.
api_datatypes.h@5:7c7220a316ed, 2015-05-19 (annotated)
- Committer:
- dishbreak
- Date:
- Tue May 19 05:01:10 2015 +0000
- Revision:
- 5:7c7220a316ed
- Parent:
- 3:8f43af513d87
- Child:
- 6:23d9a99dcde0
Updating documentation.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dishbreak | 2:3ce9a31a6a7e | 1 | #ifndef API_DATATYPES_H |
dishbreak | 2:3ce9a31a6a7e | 2 | #define API_DATATYPES_H |
dishbreak | 2:3ce9a31a6a7e | 3 | |
dishbreak | 2:3ce9a31a6a7e | 4 | /** Data structure returned from Get Info command. */ |
dishbreak | 2:3ce9a31a6a7e | 5 | typedef struct { |
dishbreak | 5:7c7220a316ed | 6 | uint16_t major; /// Major version (e.g. 1) |
dishbreak | 5:7c7220a316ed | 7 | uint16_t minor; /// Minor version (e.g. 3) |
dishbreak | 5:7c7220a316ed | 8 | uint16_t patch; /// Patch version (e.g. 2) |
dishbreak | 5:7c7220a316ed | 9 | uint16_t build; /// Build number (e.g. 122) |
dishbreak | 5:7c7220a316ed | 10 | uint16_t ll_version; /// Link Layer Version |
dishbreak | 5:7c7220a316ed | 11 | uint8_t protocol_version; /// BGAPI Version |
dishbreak | 5:7c7220a316ed | 12 | uint8_t hw; /// Hardware Version |
dishbreak | 2:3ce9a31a6a7e | 13 | } ble_msg_system_get_info_rsp_t; |
dishbreak | 2:3ce9a31a6a7e | 14 | |
dishbreak | 2:3ce9a31a6a7e | 15 | |
dishbreak | 5:7c7220a316ed | 16 | /** Data structure passed into the Reset command. */ |
dishbreak | 3:8f43af513d87 | 17 | typedef struct { |
dishbreak | 5:7c7220a316ed | 18 | uint8_t boot_in_dfu; /// Determine whether or not to boot into Device Firmware Update (DFU) mode. 1 for booting into DFU, 0 otherwise. |
dishbreak | 3:8f43af513d87 | 19 | } ble_msg_system_reset_t; |
dishbreak | 3:8f43af513d87 | 20 | |
dishbreak | 3:8f43af513d87 | 21 | typedef struct { |
dishbreak | 3:8f43af513d87 | 22 | uint16_t major; |
dishbreak | 3:8f43af513d87 | 23 | uint16_t minor; |
dishbreak | 3:8f43af513d87 | 24 | uint16_t patch; |
dishbreak | 3:8f43af513d87 | 25 | uint16_t build; |
dishbreak | 3:8f43af513d87 | 26 | uint16_t ll_version; |
dishbreak | 3:8f43af513d87 | 27 | uint8_t protocol_version; |
dishbreak | 3:8f43af513d87 | 28 | uint8_t hw; |
dishbreak | 3:8f43af513d87 | 29 | } ble_msg_system_boot_evt_t; |
dishbreak | 3:8f43af513d87 | 30 | |
dishbreak | 2:3ce9a31a6a7e | 31 | #endif |