Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Functions

Detailed Description

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...
 

Function Documentation

◆ 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.

Parameters
void
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.

Parameters
void
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.

Parameters
void
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.

Parameters
void
Return values
0x0BLE task queue is not free
0x1BLE task queue is free

◆ R_BLE_SetEvent()

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.

Parameters
cbThe 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 BLE module version.

This function returns BLE module Major(BLE_VERSION_MAJOR) and Minor(BLE_VERSION_MINOR) version.

Parameters
void
Return values
BLE_VERSION_MAJOR|BLE_VERSION_MINORMajor Version & Minor Version

◆ 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.

Parameters
void
Return values
BLE_LIB_ALL_FEATS(0x00)All Features
BLE_LIB_BALANCE(0x01)Balance
BLE_LIB_COMPACT(0x02)Compact