Interface for Bluetooth Low Energy (BLE) functions.
Summary
The BLE interface for the Bluetooth Low Energy (BLE) peripheral provides BLE functionality.
◆ BLE_VERSION_MAJOR
#define BLE_VERSION_MAJOR |
BLE Module Major Version.
◆ BLE_VERSION_MINOR
#define BLE_VERSION_MINOR |
BLE Module Minor Version.
◆ BLE_LIB_EXTENDED
BLE Protocol Stack Library Extended type.
◆ BLE_LIB_BALANCE
BLE Protocol Stack Library Balance type.
◆ BLE_LIB_COMPACT
BLE Protocol Stack Library Compacy type.
◆ ble_event_cb_t
◆ R_BLE_Open()
ble_status_t R_BLE_Open |
( |
void |
| ) |
|
Open the BLE protocol stack.
This function should be called once before using the BLE protocol stack.
- Return values
-
BLE_SUCCESS(0x0000) | Success |
◆ R_BLE_Close()
ble_status_t R_BLE_Close |
( |
void |
| ) |
|
Close the BLE protocol stack.
This function should be called once to close the BLE protocol stack.
- Return values
-
BLE_SUCCESS(0x0000) | Success |
◆ R_BLE_Execute()
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.
- Return values
-
BLE_SUCCESS(0x0000) | Success |
◆ R_BLE_IsTaskFree()
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.
- Return values
-
0x0 | BLE task queue is not free |
0x1 | BLE task queue is free |
◆ R_BLE_SetEvent()
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.
- Parameters
-
cb | The callback for the event. |
- Return values
-
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. |
◆ R_BLE_GetVersion()
uint32_t R_BLE_GetVersion |
( |
void |
| ) |
|
Get the BLE FIT module version.
This function returns the BLE FIT module version.
The major version(BLE_VERSION_MAJOR) is contained in the two most significant bytes, and the minor version(BLE_VERSION_MINOR) occupies the remaining two bytes.
- Return values
-
BLE_VERSION_MAJOR | BLE_VERSION_MINOR | |
◆ R_BLE_GetLibType()
uint32_t R_BLE_GetLibType |
( |
void |
| ) |
|
Get the type of BLE protocol stack library.
This function returns the type of BLE protocol stack library.
- Return values
-