Goodix
GR551x API Reference  V1_6_06_B5676
Functions
+ Collaboration diagram for Functions:

Functions

void ble_stack_init (app_callback_t *p_app_callback, stack_heaps_table_t *p_heaps_table)
 Initialize BEL Stack. More...
 
void ble_hci_uart_register (uint8_t id, hci_uart_call_t *api)
 Register UART instance for HCI. More...
 
void ble_idle_time_notify_cb_register (void(*callback)(uint32_t hs))
 Register BLE idle time notification callback function. More...
 
void ble_activity_start_notify_cb_register (void(*callback)(gap_activity_role_t e_role, uint8_t index))
 Register BLE activity start notification callback function. More...
 
void ble_activity_end_notify_cb_register (void(*callback)(gap_activity_role_t e_role, uint8_t index))
 Register BLE activity end notification callback function. More...
 
uint8_t ble_rf_tx_mode_set (ble_rf_tx_mode_t e_rf_tx_mode)
 Change the RF TX mode of LP or ULP. More...
 
ble_rf_tx_mode_t ble_rf_tx_mode_get (void)
 Get the RF TX mode of LP or ULP. More...
 
void ble_rf_match_circuit_set (ble_rf_match_circuit_t e_ohm)
 Set the resistance value of the RF match circuit (unit: ohm). More...
 
ble_rf_match_circuit_t ble_rf_match_circuit_get (void)
 Get the resistance value of the RF match circuit (unit: ohm). More...
 
void send_signal_carrier_wave (uint8_t channel)
 Generate a signal carrier wave. More...
 

Detailed Description

Function Documentation

◆ ble_activity_end_notify_cb_register()

void ble_activity_end_notify_cb_register ( void(*)(gap_activity_role_t e_role, uint8_t index)  callback)

Register BLE activity end notification callback function.

Parameters
[in]callbackfunction pointer of BLE activity end notification function.
Note
param[in] of callback: e_role - the role of activity, gap_activity_role_t for possible roles. param[in] of callback: index - The index parameter is interpreted by role. If role is GAP_ACTIVITY_ROLE_ADV, it's the index of Advertising. If role is GAP_ACTIVITY_ROLE_CON, it's the index of Connection. For all other roles, it should be ignored. Callback will be called by BLE ISR when the BLE activity ends every time. It should be realized as simlpe as you can. You'd better to define it in the RAM space It's not suitable for ISO activities.

◆ ble_activity_start_notify_cb_register()

void ble_activity_start_notify_cb_register ( void(*)(gap_activity_role_t e_role, uint8_t index)  callback)

Register BLE activity start notification callback function.

Parameters
[in]callbackfunction pointer of BLE activity start notification function.
Note
param[in] of callback: e_role - the role of activity, gap_activity_role_t for possible roles. param[in] of callback: index - The index parameter is interpreted by role. If role is GAP_ACTIVITY_ROLE_ADV, it's the index of Advertising. If role is GAP_ACTIVITY_ROLE_CON, it's the index of Connection. For all other roles, it should be ignored. Callback will be called by BLE ISR when the BLE activity starts every time. It should be realized as simlpe as you can. Notice: You must define the start callback in the RAM space to avoid hardfault. It's not suitable for ISO activities.

◆ ble_hci_uart_register()

void ble_hci_uart_register ( uint8_t  id,
hci_uart_call_t api 
)

Register UART instance for HCI.

Parameters
[in]idInstance index.
[in]apiPointer to the struct of function pointers for HCI UART.

◆ ble_idle_time_notify_cb_register()

void ble_idle_time_notify_cb_register ( void(*)(uint32_t hs)  callback)

Register BLE idle time notification callback function.

Parameters
[in]callbackfunction pointer of BLE idle time notification function.
Note
param[in] of callback: hs - the idle time of BLE in half slot (312.5μs). Callback will be called by BLE ISR to notify the rest idle time if there are some BLE activities. It should be realized as simlpe as you can. It's not suitable for ISO activities.

◆ ble_rf_match_circuit_get()

ble_rf_match_circuit_t ble_rf_match_circuit_get ( void  )

Get the resistance value of the RF match circuit (unit: ohm).

Returns
The resistance value (ohm) of the RF match circuit according to the board (ohm). BLE_RF_MATCH_CIRCUIT_25OHM: 25 ohm. BLE_RF_MATCH_CIRCUIT_100OHM: 100 ohm. Others: invalid.

◆ ble_rf_match_circuit_set()

void ble_rf_match_circuit_set ( ble_rf_match_circuit_t  e_ohm)

Set the resistance value of the RF match circuit (unit: ohm).

Note
This function should be called before BLE stack init.
Parameters
[in]e_ohmThe resistance value (ohm) of the RF match circuit according to the board. BLE_RF_MATCH_CIRCUIT_25OHM: 25 ohm. BLE_RF_MATCH_CIRCUIT_100OHM: 100 ohm. Others: invalid.

◆ ble_rf_tx_mode_get()

ble_rf_tx_mode_t ble_rf_tx_mode_get ( void  )

Get the RF TX mode of LP or ULP.

Returns
BLE_RF_TX_MODE_LP_MODE: LP Mode. BLE_RF_TX_MODE_ULP_MODE: ULP Mode. Others: Fail.

◆ ble_rf_tx_mode_set()

uint8_t ble_rf_tx_mode_set ( ble_rf_tx_mode_t  e_rf_tx_mode)

Change the RF TX mode of LP or ULP.

Parameters
[in]e_rf_tx_modeRefer to ble_rf_tx_mode_t. BLE_RF_TX_MODE_LP_MODE: LP mode. BLE_RF_TX_MODE_ULP_MODE: ULP mode. Others: invalid mode.
Note
This function should be called before BLE stack init.
Returns
SDK_SUCCESS: Successfully set Tx mode.
SDK_ERR_DISALLOWED: Failed to set Tx mode.

◆ ble_stack_init()

void ble_stack_init ( app_callback_t p_app_callback,
stack_heaps_table_t p_heaps_table 
)

Initialize BEL Stack.

Parameters
[in]p_app_callbackPointer to the structure of app callbacks.
[in]p_heaps_tablePointer to the BLE stack heaps table.

◆ send_signal_carrier_wave()

void send_signal_carrier_wave ( uint8_t  channel)

Generate a signal carrier wave.

Parameters
[in]channel0~39 channel, 2402~2480 Mhz.