RA Flexible Software Package Documentation
Release v5.7.0
|
|
Functions | |
ble_status_t | R_BLE_VS_Init (ble_vs_app_cb_t vs_cb) |
This function initializes Vendor Specific API and registers a callback function for Vendor Specific Event. More... | |
ble_status_t | R_BLE_VS_StartTxTest (st_ble_vs_tx_test_param_t *p_tx_test_param) |
This function starts extended Transmitter Test. More... | |
ble_status_t | R_BLE_VS_StartRxTest (st_ble_vs_rx_test_param_t *p_rx_test_param) |
This function starts extended Receiver Test. More... | |
ble_status_t | R_BLE_VS_EndTest (void) |
This function terminates the extended transmitter or receiver test. More... | |
ble_status_t | R_BLE_VS_SetTxPower (uint16_t conn_hdl, uint8_t tx_power) |
This function configures transmit power. More... | |
ble_status_t | R_BLE_VS_GetTxPower (uint16_t conn_hdl) |
This function gets transmit power. More... | |
ble_status_t | R_BLE_VS_SetCodingScheme (uint8_t coding_scheme) |
This function configure default Coding scheme(S=8 or S=2) that is used in the case of selecting Coded PHY in Primary advertising PHY or Secondary advertising PHY advertising or request for link establishment. More... | |
ble_status_t | R_BLE_VS_SetRfControl (st_ble_vs_set_rf_ctrl_param_t *p_rf_ctrl) |
This function performs power control on RF. More... | |
ble_status_t | R_BLE_VS_SetBdAddr (uint8_t area, st_ble_dev_addr_t *p_addr) |
This function sets public/random address of local device to the area specified by the parameter. More... | |
ble_status_t | R_BLE_VS_GetBdAddr (uint8_t area, uint8_t addr_type) |
This function gets currently configured public/random address. More... | |
ble_status_t | R_BLE_VS_GetRand (uint8_t rand_size) |
This function generates 4-16 bytes of random number used in creating keys. More... | |
ble_status_t | R_BLE_VS_StartTxFlowEvtNtf (void) |
This function starts the notification(BLE_VS_EVENT_TX_FLOW_STATE_CHG event) of the state transition of TxFlow. More... | |
ble_status_t | R_BLE_VS_StopTxFlowEvtNtf (void) |
This function stops the notification(BLE_VS_EVENT_TX_FLOW_STATE_CHG event) of the state transition of TxFlow. More... | |
ble_status_t | R_BLE_VS_GetTxBufferNum (uint32_t *p_buffer_num) |
This function retrieves the number of the available transmission packet buffers. More... | |
ble_status_t | R_BLE_VS_SetTxLimit (uint32_t tx_queue_lwm, uint32_t tx_queue_hwm) |
This function sets the threshold for notifying the application layer of the TxFlow state. More... | |
ble_status_t | R_BLE_VS_SetScanChMap (uint16_t ch_map) |
This function sets the scan channel map. More... | |
ble_status_t | R_BLE_VS_GetScanChMap (void) |
This function gets currently scan channel map. More... | |
ble_status_t | R_BLE_VS_StartFirmwareUpdate (void) |
This function starts the firmware update procedure. More... | |
ble_status_t | R_BLE_VS_SendFirmwareData (uint16_t index, uint16_t length, uint8_t const *const p_data) |
This function sends a firmware update data frame. More... | |
ble_status_t | R_BLE_VS_EndFirmwareUpdate (uint16_t end_index) |
This function ends the firmware update procedure. More... | |
ble_status_t | R_BLE_VS_GetFirmwareVersion (void) |
This function requests the BLE module firmware version. More... | |
ble_status_t | R_BLE_VS_RestartModule (void) |
This function restarts the module. More... | |
Data Structures | |
struct | st_ble_vs_tx_test_param_t |
This is the extended transmitter test parameters used in R_BLE_VS_StartTxTest(). More... | |
struct | st_ble_vs_rx_test_param_t |
This is the extended receiver test parameters used in R_BLE_VS_StartRxTest(). More... | |
struct | st_ble_vs_set_rf_ctrl_param_t |
This is the RF parameters used in R_BLE_VS_SetRfControl(). More... | |
struct | st_ble_vs_test_end_evt_t |
This structure notifies that the extended test has been terminated. More... | |
struct | st_ble_vs_set_tx_pwr_comp_evt_t |
This structure notifies that tx power has been set. More... | |
struct | st_ble_vs_get_tx_pwr_comp_evt_t |
This structure notifies that tx power has been retrieved. More... | |
struct | st_ble_vs_set_rf_ctrl_comp_evt_t |
This structure notifies that RF has been configured. More... | |
struct | st_ble_vs_get_bd_addr_comp_evt_t |
This structure notifies that BD_ADDR has been retrieved. More... | |
struct | st_ble_vs_get_rand_comp_evt_t |
This structure notifies that random number has been generated. More... | |
struct | st_ble_vs_tx_flow_chg_evt_t |
This structure notifies that the state transition of TxFlow has been changed. More... | |
struct | st_ble_vs_evt_data_t |
st_ble_vs_evt_data_t is the type of the data notified in a Vendor Specific Event. More... | |
struct | st_ble_vs_get_scan_ch_map_comp_evt_t |
This structure notifies that current scan channel map. More... | |
struct | st_ble_vs_get_fw_version_comp_evt_t |
This structure notifies the current firmware version. More... | |
Macros | |
#define | BLE_VS_TX_POWER_HIGH |
High power level. | |
#define | BLE_VS_TX_POWER_MID |
Middle power level. | |
#define | BLE_VS_TX_POWER_LOW |
Low power level. | |
#define | BLE_VS_ADDR_AREA_REG |
Address in register is written or read. | |
#define | BLE_VS_ADDR_AREA_DATA_FLASH |
Address in DataFlash is written or read. | |
#define | BLE_VS_EH_TX_PL_PRBS9 |
PRBS9 sequence '11111111100000111101..'. | |
#define | BLE_VS_EH_TX_PL_11110000 |
Repeated '11110000'. | |
#define | BLE_VS_EH_TX_PL_10101010 |
Repeated '10101010'. | |
#define | BLE_VS_EH_TX_PL_PRBS15 |
PRBS15 sequence. | |
#define | BLE_VS_EH_TX_PL_11111111 |
Repeated '11111111'. | |
#define | BLE_VS_EH_TX_PL_00000000 |
Repeated '00000000'. | |
#define | BLE_VS_EH_TX_PL_00001111 |
Repeated '00001111'. | |
#define | BLE_VS_EH_TX_PL_01010101 |
Repeated '01010101'. | |
#define | BLE_VS_EH_TEST_PHY_1M |
1M PHY used in Transmitter/Receiver test. | |
#define | BLE_VS_EH_TEST_PHY_2M |
2M PHY used in Transmitter/Receiver test. | |
#define | BLE_VS_EH_TEST_PHY_CODED |
Coded PHY used in Receiver test. | |
#define | BLE_VS_EH_TEST_PHY_CODED_S_8 |
Coded PHY(S=8) used in Transmitter test. | |
#define | BLE_VS_EH_TEST_PHY_CODED_S_2 |
Coded PHY(S=2) used in Transmitter test. | |
#define | BLE_VS_RF_OFF |
RF power off. | |
#define | BLE_VS_RF_ON |
RF power on. | |
#define | BLE_VS_RF_INIT_PARAM_NOT_CHG |
The parameters are not changed in RF power on. | |
#define | BLE_VS_RF_INIT_PARAM_CHG |
The parameters are changed in RF power on. | |
#define | BLE_VS_CS_PRIM_ADV_S_8 |
Coding scheme for Primary Advertising PHY(S=8). | |
#define | BLE_VS_CS_PRIM_ADV_S_2 |
Coding scheme for Primary Advertising PHY(S=2). | |
#define | BLE_VS_CS_SECOND_ADV_S_8 |
Coding scheme for Secondary Advertising PHY(S=8). | |
#define | BLE_VS_CS_SECOND_ADV_S_2 |
Coding scheme for Secondary Advertising PHY(S=2). | |
#define | BLE_VS_CS_CONN_S_8 |
Coding scheme for request for link establishment(S=8). | |
#define | BLE_VS_CS_CONN_S_2 |
Coding scheme for request for link establishment(S=2). | |
#define | BLE_VS_TX_FLOW_CTL_ON |
It means that the number of buffer has reached the High Water Mark from flow off state. | |
#define | BLE_VS_TX_FLOW_CTL_OFF |
It means that the number of buffer has reached the Low Water Mark from flow on state. | |
Typedefs | |
typedef void(* | ble_vs_app_cb_t) (uint16_t event_type, ble_status_t event_result, st_ble_vs_evt_data_t *p_event_data) |
ble_vs_app_cb_t is the Vendor Specific Event callback function type. More... | |
Enumerations | |
enum | e_r_ble_vs_evt_t |
Vendor Specific Event Identifier. More... | |
struct st_ble_vs_tx_test_param_t |
This is the extended transmitter test parameters used in R_BLE_VS_StartTxTest().
struct st_ble_vs_rx_test_param_t |
This is the extended receiver test parameters used in R_BLE_VS_StartRxTest().
Data Fields | ||
---|---|---|
uint8_t | ch | Channel used in Rx test. |
uint8_t | phy | Receiver PHY used in the test. |
struct st_ble_vs_set_rf_ctrl_param_t |
This is the RF parameters used in R_BLE_VS_SetRfControl().
struct st_ble_vs_test_end_evt_t |
This structure notifies that the extended test has been terminated.
struct st_ble_vs_set_tx_pwr_comp_evt_t |
struct st_ble_vs_get_tx_pwr_comp_evt_t |
struct st_ble_vs_set_rf_ctrl_comp_evt_t |
struct st_ble_vs_get_bd_addr_comp_evt_t |
This structure notifies that BD_ADDR has been retrieved.
Data Fields | ||||||||
---|---|---|---|---|---|---|---|---|
uint8_t | area |
The area that public/random address has been retrieved.
| ||||||
st_ble_dev_addr_t | addr | The address that has been retrieved. |
struct st_ble_vs_get_rand_comp_evt_t |
struct st_ble_vs_tx_flow_chg_evt_t |
This structure notifies that the state transition of TxFlow has been changed.
Data Fields | ||||||||
---|---|---|---|---|---|---|---|---|
uint8_t | state |
The state of the flow control.
| ||||||
uint32_t | buffer_num | The number of the current transmission buffers. |
struct st_ble_vs_evt_data_t |
st_ble_vs_evt_data_t is the type of the data notified in a Vendor Specific Event.
Data Fields | ||
---|---|---|
uint16_t | param_len | The size of Vendor Specific Event parameters. |
void * | p_param | Vendor Specific Event parameters. This parameter differs in each Vendor Specific Event. |
struct st_ble_vs_get_scan_ch_map_comp_evt_t |
struct st_ble_vs_get_fw_version_comp_evt_t |
ble_vs_app_cb_t |
ble_vs_app_cb_t is the Vendor Specific Event callback function type.
[in] | event_type | The type of Vendor Specific Event. |
[in] | event_result | The result of API call which generates the Vendor Specific Event. |
[in] | p_event_data | Data notified in the Vendor Specific Event. |
enum e_r_ble_vs_evt_t |
Vendor Specific Event Identifier.
Enumerator | |||||||
---|---|---|---|---|---|---|---|
BLE_VS_EVENT_SET_TX_POWER | This event notifies that the tx power has been set by R_BLE_VS_SetTxPower(). Event Code: 0x8001result:
Event Data: | ||||||
BLE_VS_EVENT_GET_TX_POWER | This event notifies that the tx power has been retrieved by R_BLE_VS_GetTxPower(). Event Code: 0x8002result:
Event Data: | ||||||
BLE_VS_EVENT_TX_TEST_START | This event notifies that the extended transmitter test has been started by R_BLE_VS_StartTxTest(). Event Code: 0x8003result:
Event Data:none | ||||||
BLE_VS_EVENT_TX_TEST_TERM | This event notifies that the number specified by R_BLE_VS_StartTxTest() of packets has been sent. Event Code: 0x8004result:
Event Data:none | ||||||
BLE_VS_EVENT_RX_TEST_START | This event notifies that the extended receiver test has been started by R_BLE_VS_StartRxTest(). Event Code: 0x8005result:
Event Data:none | ||||||
BLE_VS_EVENT_TEST_END | This event notifies that the extended test has been terminated by R_BLE_VS_EndTest(). Event Code: 0x8006result:
Event Data: | ||||||
BLE_VS_EVENT_SET_CODING_SCHEME_COMP | This event notifies that the coding scheme has been configured by R_BLE_VS_SetCodingScheme(). Event Code: 0x8007result:
Event Data:none | ||||||
BLE_VS_EVENT_RF_CONTROL_COMP | This event notifies that the RF has been configured by R_BLE_VS_SetRfControl(). Event Code: 0x8008result:
Event Data: | ||||||
BLE_VS_EVENT_SET_ADDR_COMP | This event notifies that public/random address has been set by R_BLE_VS_SetBdAddr(). Event Code: 0x8009result:
Event Data:none | ||||||
BLE_VS_EVENT_GET_ADDR_COMP | This event notifies that public/random address has been retrieved by R_BLE_VS_GetBdAddr(). Event Code: 0x800Aresult:
Event Data: | ||||||
BLE_VS_EVENT_GET_RAND | This event notifies the application layer that random number has been generated by R_BLE_VS_GetRand(). Event Code: 0x800Bresult:
Event Data: | ||||||
BLE_VS_EVENT_TX_FLOW_STATE_CHG | This event notifies the application layer of the state transition of TxFlow. Event Code: 0x800Cresult:
Event Data: | ||||||
BLE_VS_EVENT_FAIL_DETECT | This event notifies a failure occurs in RF. After receiving the event, reset MCU or RF. Event Code: 0x800Dresult:
Event Data:None | ||||||
BLE_VS_EVENT_SET_SCAN_CH_MAP | This event notifies that scan channel map has been set by R_BLE_VS_SetScanChMap(). Event Code: 0x800Eresult:
Event Data:none | ||||||
BLE_VS_EVENT_GET_SCAN_CH_MAP | This event notifies that scan channel map has been retrieved by R_BLE_VS_GetScanChMap(). Event Code: 0x800Fresult:
Event Data: | ||||||
BLE_VS_EVENT_START_FW_UPDATE_COMP | This event notifies that START_FW_UPDATE command has completed. Event Code: 0x072Cresult:
Event Data:none | ||||||
BLE_VS_EVENT_SEND_FW_DATA_COMP | This event notifies that SEND_FW_DATA command has completed. Event Code: 0x072Dresult:
Event Data:none | ||||||
BLE_VS_EVENT_END_FW_UPDATE_COMP | This event notifies that END_FW_UPDATE command has completed. Event Code: 0x072Eresult:
Event Data:none | ||||||
BLE_VS_EVENT_GET_FW_VERSION_COMP | This event notifies that END_FW_UPDATE command has completed. Event Code: 0x0772result:
Event Data: | ||||||
BLE_VS_EVENT_MODULE_READY_COMP | This event notifies that module is ready. Event Code: 0x0746result:
Event Data:none | ||||||
BLE_VS_EVENT_OTA_START_NOTIFY | This event notifies that OTA firmware update has been started. Event Code: 0x09B0result:
Event Data:none | ||||||
BLE_VS_EVENT_OTA_END_NOTIFY | This event notifies that OTA firmware update has been completed successfully. Event Code: 0x09C0result:
Event Data:none | ||||||
BLE_VS_EVENT_OTA_ERROR_NOTIFY | This event notifies that OTA firmware update has failed. Event Code: 0x09D0result:
Event Data:none | ||||||
BLE_VS_EVENT_INVALID | Invalid VS Event. Event Code: 0x80FFresult:
Event Data:none |
ble_status_t R_BLE_VS_Init | ( | ble_vs_app_cb_t | vs_cb | ) |
This function initializes Vendor Specific API and registers a callback function for Vendor Specific Event.
The result of this API call is returned by a return value.
[in] | vs_cb | Callback function to be registered. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The vs_cb parameter is specified as NULL. |
BLE_ERR_CONTEXT_FULL(0x000B) | Callback function has already been registered. |
ble_status_t R_BLE_VS_StartTxTest | ( | st_ble_vs_tx_test_param_t * | p_tx_test_param | ) |
This function starts extended Transmitter Test.
The following extended transmitter test functions of DTM Tx are supported by this function.
The result of this API call is notified in BLE_VS_EVENT_TX_TEST_START event.
If the num_of_packet field in the p_tx_test_param parameter is other than 0x0000, BLE_VS_EVENT_TX_TEST_TERM event notifies the application layer that the number of packet has been sent.
If R_BLE_VS_EndTest() is called before the specified number of packets completions, BLE_VS_EVENT_TX_TEST_TERM event is not notified to the application layer.
The condition that phy field in the p_tx_test_param parameter is BLE_VS_EH_TEST_PHY_CODED_S_8(0x03) and option field is modulation(bit0:0) & continuous transmission(bit1:1) is not supported.
[in] | p_tx_test_param | Tx Test parameters. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_tx_test_param parameter is specified as NULL. |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_StartRxTest | ( | st_ble_vs_rx_test_param_t * | p_rx_test_param | ) |
This function starts extended Receiver Test.
The result of this API call is notified in BLE_VS_EVENT_RX_TEST_START event. The following extended receiver test functions of DTM Rx are supported by this function.
The transmitter is configured to one of the following, the receiver can't receive the packets by this function.
[in] | p_rx_test_param | The extended receiver test parameters. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_rx_test_param parameter is specified as NULL. |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_EndTest | ( | void | ) |
This function terminates the extended transmitter or receiver test.
The result of this API call is notified in BLE_VS_EVENT_TEST_END event. In case of extended receiver test, this event notifies the application layer of the result of the extended receiver test.
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_SetTxPower | ( | uint16_t | conn_hdl, |
uint8_t | tx_power | ||
) |
This function configures transmit power.
This function configures the following transmit power.
Max transmit power of "High" is dependent on the configuration of the firmware. The result of this API call is notified in BLE_VS_EVENT_SET_TX_POWER event.
[in] | conn_hdl | Connection handle identifying the link whose transmit power to be configured. If non connected state, set BLE_GAP_INIT_CONN_HDL(0xFFFF). |
[in] | tx_power | Transmission power. Select one of the following. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_GetTxPower | ( | uint16_t | conn_hdl | ) |
This function gets transmit power.
This function gets the following transmit power.
[in] | conn_hdl | Connection handle identifying the link whose transmit power to be retrieved. If non connected state, set BLE_GAP_INIT_CONN_HDL(0xFFFF). |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_SetCodingScheme | ( | uint8_t | coding_scheme | ) |
This function configure default Coding scheme(S=8 or S=2) that is used in the case of selecting Coded PHY in Primary advertising PHY or Secondary advertising PHY advertising or request for link establishment.
After setting the default Coding scheme by this function, configure the advertising parameters by R_BLE_GAP_SetAdvParam() or send a request for link establishment.
The result of this API call is notified in BLE_VS_EVENT_SET_CODING_SCHEME_COMP event.
[in] | coding_scheme | Coding scheme for Primary advertising PHY, Secondary advertising PHY, request for link establishment.The coding_scheme field is set to a bitwise OR of the following values.
|
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_SetRfControl | ( | st_ble_vs_set_rf_ctrl_param_t * | p_rf_ctrl | ) |
This function performs power control on RF.
If BLE communication is not used for a long time, RF reduces the power consumption by moving to the RF Power-Down Mode.
When RF power on, RF initialization processing is executed.
After RF power off by this function, API functions other than this are not available until RF power on again.
The result of this API call is notified in BLE_VS_EVENT_RF_CONTROL_COMP event. After RF power on again with this function, call R_BLE_GAP_Terminate(), R_BLE_GAP_Init() in order to restart the host stack.
[in] | p_rf_ctrl | RF parameters. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_rf_ctrl parameter is specified as NULL. |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_SetBdAddr | ( | uint8_t | area, |
st_ble_dev_addr_t * | p_addr | ||
) |
This function sets public/random address of local device to the area specified by the parameter.
If the address is written in non-volatile area, the address is used as default address on the next MCU reset.
For more information on the random address, refer to Core Specification Vol 6, PartB, "1.3.2 Random Device Address".
The result of this API call is notified in BLE_VS_EVENT_SET_ADDR_COMP event.
[in] | area | The area that the address is to be written in. Select one of the following.
| ||||||
[in] | p_addr | The address to be set to the area. Set BLE_GAP_ADDR_PUBLIC(0x00) or BLE_GAP_ADDR_RAND(0x01) to the type field in the p_addr parameter. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_addr parameter is specified as NULL. |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_GetBdAddr | ( | uint8_t | area, |
uint8_t | addr_type | ||
) |
This function gets currently configured public/random address.
The area parameter specifies the place where this function retrieves public/random address.
The result of this API call is notified in BLE_VS_EVENT_GET_ADDR_COMP event.
[in] | area | The area that the address is to be retrieved. Select one of the following.
| ||||||
[in] | addr_type | The address type that is type of the address to be retrieved.
|
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_GetRand | ( | uint8_t | rand_size | ) |
This function generates 4-16 bytes of random number used in creating keys.
The result of this API call is notified in BLE_VS_EVENT_GET_RAND event.
[in] | rand_size | Length of the random number (byte). The valid range is 4<=rand_size<=16. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_STATE(0x0008) | The task for host stack is not running. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | There are no memories for Vendor Specific Command. |
ble_status_t R_BLE_VS_StartTxFlowEvtNtf | ( | void | ) |
This function starts the notification(BLE_VS_EVENT_TX_FLOW_STATE_CHG event) of the state transition of TxFlow.
If the number of the available transmission packet buffers is the following, BLE_VS_EVENT_TX_FLOW_STATE_CHG event notifies the application layer of the state of the TxFlow.
BLE_SUCCESS(0x0000) | Success |
ble_status_t R_BLE_VS_StopTxFlowEvtNtf | ( | void | ) |
This function stops the notification(BLE_VS_EVENT_TX_FLOW_STATE_CHG event) of the state transition of TxFlow.
The result of this API call is returned by a return value.
BLE_SUCCESS(0x0000) | Success |
ble_status_t R_BLE_VS_GetTxBufferNum | ( | uint32_t * | p_buffer_num | ) |
This function retrieves the number of the available transmission packet buffers.
The maximum number of the available buffers is 10.
The result of this API call is returned by a return value.
[out] | p_buffer_num | The number of the available transmission packet buffers. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_buffer_num parameter is specified as NULL. |
ble_status_t R_BLE_VS_SetTxLimit | ( | uint32_t | tx_queue_lwm, |
uint32_t | tx_queue_hwm | ||
) |
This function sets the threshold for notifying the application layer of the TxFlow state.
Call this function before the notification(BLE_VS_EVENT_TX_FLOW_STATE_CHG event) has been started by R_BLE_VS_StartTxFlowEvtNtf().
The result is returned from this API.
Vendor Specific API supports the flow control function(TxFlow) for the transmission on L2CAP fixed channel in Basic Mode such as GATT.
Host stack has 10 transmission packet buffers for the transmission.
When the number of the available transmission packet buffers has been less than Low Water Mark, the state of TxFlow transmits into the TxFlow OFF state from the TxFlow ON state that is the initial state and host stack notifies the application layer of timing to stop packet transmission.
When host stack has sent the transmission packets to Controller and the number of the available transmission packet buffers has been more than High Water Mark, the state of TxFlow transmits into the TxFlow ON state from the TxFlow OFF state and host stack notifies the application layer of timing to restart packet transmission.
It is possible to perform flow control on a fixed channel by using the event notification.
[in] | tx_queue_lwm | Low Water Mark. Set 0-9 less than tx_queue_hwm to the parameter. When the number of the available transmission packet buffers has been less than the value specified by the tx_queue_lwm parameter, host stack notifies the application layer of the timing to stop packet transmission. |
[in] | tx_queue_hwm | High Water Mark. Set 1-10 more than tx_queue_lwm to the parameter. When the number of the available transmission packet buffers has been more than the value specified by the tx_queue_hwm parameter, host stack notifies the application layer of the timing to restart packet transmission. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_ARG(0x0003) | The tx_queue_lwm parameter or the tx_queue_hwm parameter is out of range. |
ble_status_t R_BLE_VS_SetScanChMap | ( | uint16_t | ch_map | ) |
This function sets the scan channel map.
Set specify the scan channel for use.
At least one channel must be enabled.
[in] | ch_map | Specify the channel map for use.
|
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_ARG(0x0003) | The ch_map parameter is out of range. |
ble_status_t R_BLE_VS_GetScanChMap | ( | void | ) |
This function gets currently scan channel map.
The result of this API call is notified in BLE_VS_EVENT_GET_SCAN_CH_MAP event.
BLE_SUCCESS(0x0000) | Success |
ble_status_t R_BLE_VS_StartFirmwareUpdate | ( | void | ) |
This function starts the firmware update procedure.
The result of this API call is notified in BLE_VS_EVENT_START_FW_UPDATE_COMP event.
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_MODE | A command was sent from an invalid mode |
BLE_ERR_UNSUPPORTED | This API does not support |
ble_status_t R_BLE_VS_SendFirmwareData | ( | uint16_t | index, |
uint16_t | length, | ||
uint8_t const *const | p_data | ||
) |
This function sends a firmware update data frame.
[in] | index | The index of the current data frame. |
[in] | length | The length of the current data frame. |
[in] | p_data | A pointer to the data frame. |
The result of this API call is notified in BLE_VS_EVENT_SEND_FW_DATA_COMP event.
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_ARG | An input parameter was invalid |
BLE_ERR_INVALID_MODE | A command was sent from an invalid mode |
BLE_ERR_UNSUPPORTED | This API does not support |
ble_status_t R_BLE_VS_EndFirmwareUpdate | ( | uint16_t | end_index | ) |
This function ends the firmware update procedure.
[in] | end_index | The index of the last data frame. |
The result of this API call is notified in BLE_VS_EVENT_END_FW_UPDATE_COMP event.
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_MODE | A command was sent from an invalid mode |
BLE_ERR_UNSUPPORTED | This API does not support |
ble_status_t R_BLE_VS_GetFirmwareVersion | ( | void | ) |
This function requests the BLE module firmware version.
The result of this API call is notified in BLE_VS_EVENT_GET_FW_VERSION_COMP event.
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_MODE | A command was sent from an invalid mode |
BLE_ERR_UNSUPPORTED | This API does not support |
ble_status_t R_BLE_VS_RestartModule | ( | void | ) |
This function restarts the module.
The result of this API call is notified in BLE_VS_EVENT_MODULE_READY_COMP event.
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_RSP_TIMEOUT | A command did not receive a response |
BLE_ERR_INVALID_MODE | A command was sent from an invalid mode |
BLE_ERR_UNSUPPORTED | This API does not support |