![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
Functions | |
ble_status_t | R_BLE_Open (void) |
Open the BLE protocol stack. More... | |
ble_status_t | R_BLE_Close (void) |
Close the BLE protocol stack. More... | |
ble_status_t | R_BLE_Execute (void) |
Execute the BLE task. More... | |
uint32_t | R_BLE_IsTaskFree (void) |
Check the BLE task queue is free or not. More... | |
ble_status_t | R_BLE_SetEvent (ble_event_cb_t cb) |
Set event. More... | |
uint32_t | R_BLE_GetVersion (void) |
Get BLE module version. More... | |
uint32_t | R_BLE_GetLibType (void) |
Get the type of BLE protocol stack library. More... | |
ble_status_t R_BLE_Open | ( | void | ) |
Open the BLE protocol stack.
This function should be called once before using the BLE protocol stack.
void |
BLE_SUCCESS(0x0000) | Success |
ble_status_t R_BLE_Close | ( | void | ) |
Close the BLE protocol stack.
This function should be called once to close the BLE protocol stack.
void |
BLE_SUCCESS(0x0000) | Success |
ble_status_t R_BLE_Execute | ( | void | ) |
Execute the BLE task.
This handles all the task queued in the BLE protocol stack internal task queue and return.
This function should be called repeatedly in the main loop.
void |
BLE_SUCCESS(0x0000) | Success |
uint32_t R_BLE_IsTaskFree | ( | void | ) |
Check the BLE task queue is free or not.
This function returns the BLE task queue free status.
When this function returns 0x0, call R_BLE_Execute() to execute the BLE task.
void |
0x0 | BLE task queue is not free |
0x1 | BLE task queue is free |
ble_status_t R_BLE_SetEvent | ( | ble_event_cb_t | cb | ) |
Set event.
This function add an event in the BLE protocol stack internal queue. The event is handled in R_BLE_Execute() just like Bluetooth event. This function is intended to be called in hardware interrupt context.
Even if calling this function with the same cb before the cb is invoked, only one event is registered.
The maximum number of the events can be registered at a time is eight.
cb | The callback for the event. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_ALREADY_IN_PROGRESS(0x000A) | The event already registered with the callback. |
BLE_ERR_CONTEXT_FULL(0x000B) | No free slot for the event. |
uint32_t R_BLE_GetVersion | ( | void | ) |
Get BLE module version.
This function returns BLE module Major(BLE_VERSION_MAJOR) and Minor(BLE_VERSION_MINOR) version.
void |
BLE_VERSION_MAJOR|BLE_VERSION_MINOR | Major Version & Minor Version |
uint32_t R_BLE_GetLibType | ( | void | ) |
Get the type of BLE protocol stack library.
This function returns the type of BLE protocol stack library.
void |
BLE_LIB_ALL_FEATS(0x00) | All Features |
BLE_LIB_BALANCE(0x01) | Balance |
BLE_LIB_COMPACT(0x02) | Compact |