Register Callbacks#

Functions#

void
rsi_ble_gap_register_callbacks(rsi_ble_on_adv_report_event_t ble_on_adv_report_event, rsi_ble_on_connect_t ble_on_conn_status_event, rsi_ble_on_disconnect_t ble_on_disconnect_event, rsi_ble_on_le_ping_payload_timeout_t timeout_expired_event, rsi_ble_on_phy_update_complete_t ble_on_phy_update_complete_event, rsi_ble_on_data_length_update_t ble_on_data_length_update_complete_event, rsi_ble_on_enhance_connect_t ble_on_enhance_conn_status_event, rsi_ble_on_directed_adv_report_event_t ble_on_directed_adv_report_event, rsi_ble_on_conn_update_complete_t ble_on_conn_update_complete_event, rsi_ble_on_remote_conn_params_request_t ble_on_remote_conn_params_request_event)

Register GAP callbacks.

void
rsi_ble_gap_extended_register_callbacks(rsi_ble_on_remote_features_t ble_on_remote_features_event, rsi_ble_on_le_more_data_req_t ble_on_le_more_data_req_event)

Register GAP Extended responses/events callbacks.

uint32_t
rsi_ble_enhanced_gap_extended_register_callbacks(uint16_t callback_id, void(*callback_handler_ptr)(uint16_t status, uint8_t *buffer))

Registers a callback function for the Enhanced GAP Extended feature in the RSI BLE module.

int32_t
rsi_ble_adv_ext_events_register_callbacks(uint16_t callback_id, void(*callback_handler_ptr)(uint16_t status, uint8_t *buffer))

Registers callback functions for extended advertising events in the BLE module.

void
rsi_ble_smp_register_callbacks(rsi_ble_on_smp_request_t ble_on_smp_request_event, rsi_ble_on_smp_response_t ble_on_smp_response_event, rsi_ble_on_smp_passkey_t ble_on_smp_passkey_event, rsi_ble_on_smp_failed_t ble_on_smp_fail_event, rsi_ble_on_encrypt_started_t rsi_ble_on_encrypt_started_event, rsi_ble_on_smp_passkey_display_t ble_on_smp_passkey_display_event, rsi_ble_on_sc_passkey_t ble_sc_passkey_event, rsi_ble_on_le_ltk_req_event_t ble_on_le_ltk_req_event, rsi_ble_on_le_security_keys_t ble_on_le_security_keys_event, rsi_ble_on_smp_response_t ble_on_cli_smp_response_event, rsi_ble_on_sc_method_t ble_on_sc_method_event)

Register the SMP callbacks.

void
rsi_ble_gatt_register_callbacks(rsi_ble_on_profiles_list_resp_t ble_on_profiles_list_resp, rsi_ble_on_profile_resp_t ble_on_profile_resp, rsi_ble_on_char_services_resp_t ble_on_char_services_resp, rsi_ble_on_inc_services_resp_t ble_on_inc_services_resp, rsi_ble_on_att_desc_resp_t ble_on_att_desc_resp, rsi_ble_on_read_resp_t ble_on_read_resp, rsi_ble_on_write_resp_t ble_on_write_resp, rsi_ble_on_gatt_write_event_t ble_on_gatt_event, rsi_ble_on_gatt_prepare_write_event_t ble_on_gatt_prepare_write_event, rsi_ble_on_execute_write_event_t ble_on_execute_write_event, rsi_ble_on_read_req_event_t ble_on_read_req_event, rsi_ble_on_mtu_event_t ble_on_mtu_event, rsi_ble_on_gatt_error_resp_t ble_on_gatt_error_resp_event, rsi_ble_on_gatt_desc_val_event_t ble_on_gatt_desc_val_resp_event, rsi_ble_on_event_profiles_list_t ble_on_profiles_list_event, rsi_ble_on_event_profile_by_uuid_t ble_on_profile_by_uuid_event, rsi_ble_on_event_read_by_char_services_t ble_on_read_by_char_services_event, rsi_ble_on_event_read_by_inc_services_t ble_on_read_by_inc_services_event, rsi_ble_on_event_read_att_value_t ble_on_read_att_value_event, rsi_ble_on_event_read_resp_t ble_on_read_resp_event, rsi_ble_on_event_write_resp_t ble_on_write_resp_event, rsi_ble_on_event_indicate_confirmation_t ble_on_indicate_confirmation_event, rsi_ble_on_event_prepare_write_resp_t ble_on_prepare_write_resp_event)

Register the GATT callbacks.

void
rsi_ble_gatt_extended_register_callbacks(rsi_ble_on_mtu_exchange_info_t ble_on_mtu_exchange_info_event)

Register the GATT Extended responses/events callbacks.

Function Documentation#

rsi_ble_gap_register_callbacks#

void rsi_ble_gap_register_callbacks (rsi_ble_on_adv_report_event_t ble_on_adv_report_event, rsi_ble_on_connect_t ble_on_conn_status_event, rsi_ble_on_disconnect_t ble_on_disconnect_event, rsi_ble_on_le_ping_payload_timeout_t timeout_expired_event, rsi_ble_on_phy_update_complete_t ble_on_phy_update_complete_event, rsi_ble_on_data_length_update_t ble_on_data_length_update_complete_event, rsi_ble_on_enhance_connect_t ble_on_enhance_conn_status_event, rsi_ble_on_directed_adv_report_event_t ble_on_directed_adv_report_event, rsi_ble_on_conn_update_complete_t ble_on_conn_update_complete_event, rsi_ble_on_remote_conn_params_request_t ble_on_remote_conn_params_request_event)

Register GAP callbacks.

Parameters
[in]ble_on_adv_report_event

- Callback function for Advertise events

[in]ble_on_conn_status_event

- Callback function for Connect events

[in]ble_on_disconnect_event

- Callback function for Disconnect events

[in]timeout_expired_event

- Callback function for LE ping timeout events

[in]ble_on_phy_update_complete_event

- Callback function for PHY update complete events

[in]ble_on_data_length_update_complete_event

- Callback function for data length update events

[in]ble_on_enhance_conn_status_event

- Callback function for enhanced connection status events

[in]ble_on_directed_adv_report_event

- Callback function for directed advertising report events

[in]ble_on_conn_update_complete_event

- Callback function for conn update complete events

[in]ble_on_remote_conn_params_request_event

- Callback function to remote conn params request events


Definition at line 4902 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_gap_extended_register_callbacks#

void rsi_ble_gap_extended_register_callbacks (rsi_ble_on_remote_features_t ble_on_remote_features_event, rsi_ble_on_le_more_data_req_t ble_on_le_more_data_req_event)

Register GAP Extended responses/events callbacks.

Parameters
[in]ble_on_remote_features_event

- Call back function for Remote feature request

[in]ble_on_le_more_data_req_event

- Call back function for LE More data request

  • Pre-conditions: Call rsi_wireless_init() before calling this API.

Note

  • For more information about each callback, see the GAP Extended callbacks description section.


Definition at line 4924 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_enhanced_gap_extended_register_callbacks#

uint32_t rsi_ble_enhanced_gap_extended_register_callbacks (uint16_t callback_id, void(*)(uint16_t status, uint8_t *buffer) callback_handler_ptr)

Registers a callback function for the Enhanced GAP Extended feature in the RSI BLE module.

Parameters
N/Acallback_id

The ID of the callback to register.

N/Acallback_handler_ptr

A pointer to the callback function that will handle the events.

This function allows you to register a callback function to handle events related to the Enhanced GAP Extended feature. The callback function will be called when an event occurs, providing the status and a buffer containing additional data.

Returns

  • The status of the registration process. Possible values are defined by the uint16_t data type.

Note

  • Ensure that the callback function is implemented to handle the specific events you are interested in. The callback function should match the signature specified in the function parameters. This function should be called during the initialization phase of your application to ensure that the callbacks are registered before any events occur.


Definition at line 4946 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_adv_ext_events_register_callbacks#

int32_t rsi_ble_adv_ext_events_register_callbacks (uint16_t callback_id, void(*)(uint16_t status, uint8_t *buffer) callback_handler_ptr)

Registers callback functions for extended advertising events in the BLE module.

Parameters
N/Acallback_id

The ID of the callback function to register.

N/Acallback_handler_ptr

A pointer to the callback function that will handle the extended advertising events. The callback function should have the following signature: void callback_handler(uint16_t status, uint8_t *buffer)

  • status: The status of the extended advertising event.

  • buffer: A pointer to the buffer containing the extended advertising event data.

This function allows the application to register callback functions to handle extended advertising events in the BLE module. The callback functions will be invoked when an extended advertising event occurs.

Returns

  • Returns 0 on success, or a negative error code on failure.


Definition at line 4971 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_smp_register_callbacks#

void rsi_ble_smp_register_callbacks (rsi_ble_on_smp_request_t ble_on_smp_request_event, rsi_ble_on_smp_response_t ble_on_smp_response_event, rsi_ble_on_smp_passkey_t ble_on_smp_passkey_event, rsi_ble_on_smp_failed_t ble_on_smp_fail_event, rsi_ble_on_encrypt_started_t rsi_ble_on_encrypt_started_event, rsi_ble_on_smp_passkey_display_t ble_on_smp_passkey_display_event, rsi_ble_on_sc_passkey_t ble_sc_passkey_event, rsi_ble_on_le_ltk_req_event_t ble_on_le_ltk_req_event, rsi_ble_on_le_security_keys_t ble_on_le_security_keys_event, rsi_ble_on_smp_response_t ble_on_cli_smp_response_event, rsi_ble_on_sc_method_t ble_on_sc_method_event)

Register the SMP callbacks.

Parameters
[in]ble_on_smp_request_event

- smp request callback

[in]ble_on_smp_response_event

- smp response callback

[in]ble_on_smp_passkey_event

- smp passkey callback

[in]ble_on_smp_fail_event

- smp failed callback

[in]rsi_ble_on_encrypt_started_event

- encryption enabled callback

[in]ble_on_smp_passkey_display_event

- smp passkey display callback

[in]ble_sc_passkey_event

- sc passkey display callback

[in]ble_on_le_ltk_req_event

- This is the SMP LTK request callback

[in]ble_on_le_security_keys_event

- This is the SMP security keys callback

[in]ble_on_cli_smp_response_event

- This is the client smp response callback -

[in]ble_on_sc_method_event

- sc method display callback


Definition at line 4990 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_gatt_register_callbacks#

void rsi_ble_gatt_register_callbacks (rsi_ble_on_profiles_list_resp_t ble_on_profiles_list_resp, rsi_ble_on_profile_resp_t ble_on_profile_resp, rsi_ble_on_char_services_resp_t ble_on_char_services_resp, rsi_ble_on_inc_services_resp_t ble_on_inc_services_resp, rsi_ble_on_att_desc_resp_t ble_on_att_desc_resp, rsi_ble_on_read_resp_t ble_on_read_resp, rsi_ble_on_write_resp_t ble_on_write_resp, rsi_ble_on_gatt_write_event_t ble_on_gatt_event, rsi_ble_on_gatt_prepare_write_event_t ble_on_gatt_prepare_write_event, rsi_ble_on_execute_write_event_t ble_on_execute_write_event, rsi_ble_on_read_req_event_t ble_on_read_req_event, rsi_ble_on_mtu_event_t ble_on_mtu_event, rsi_ble_on_gatt_error_resp_t ble_on_gatt_error_resp_event, rsi_ble_on_gatt_desc_val_event_t ble_on_gatt_desc_val_resp_event, rsi_ble_on_event_profiles_list_t ble_on_profiles_list_event, rsi_ble_on_event_profile_by_uuid_t ble_on_profile_by_uuid_event, rsi_ble_on_event_read_by_char_services_t ble_on_read_by_char_services_event, rsi_ble_on_event_read_by_inc_services_t ble_on_read_by_inc_services_event, rsi_ble_on_event_read_att_value_t ble_on_read_att_value_event, rsi_ble_on_event_read_resp_t ble_on_read_resp_event, rsi_ble_on_event_write_resp_t ble_on_write_resp_event, rsi_ble_on_event_indicate_confirmation_t ble_on_indicate_confirmation_event, rsi_ble_on_event_prepare_write_resp_t ble_on_prepare_write_resp_event)

Register the GATT callbacks.

Parameters
[in]ble_on_profiles_list_resp

- Callback for rsi_ble_get_profiles command.

[in]ble_on_profile_resp

- Callback for rsi_ble_get_profile command.

[in]ble_on_char_services_resp

- Callback for rsi_ble_get_char_services command.

[in]ble_on_inc_services_resp

- Callback for rsi_ble_get_inc_services command.

[in]ble_on_att_desc_resp

- Callback for rsi_ble_get_att_descriptors command.

[in]ble_on_read_resp

- Callback for all read requests command.

[in]ble_on_write_resp

- Callback for all write commands.

[in]ble_on_gatt_event

- Callback for all GATT events.

[in]ble_on_gatt_prepare_write_event

- Callback for GATT prepare write events.

[in]ble_on_execute_write_event

- Callback for GATT execute write events.

[in]ble_on_read_req_event

- Callback for read request events.

[in]ble_on_mtu_event

- Callback for MTU events.

[in]ble_on_gatt_error_resp_event

- Callback for GATT error events.

[in]ble_on_gatt_desc_val_resp_event

- Callback for GATT descriptor value events.

[in]ble_on_profiles_list_event

- Callback for profiles list events.

[in]ble_on_profile_by_uuid_event

- Callback for profile by UUID events.

[in]ble_on_read_by_char_services_event

- Callback for read by characteristic services events.

[in]ble_on_read_by_inc_services_event

- Callback for read by included services events.

[in]ble_on_read_att_value_event

- Callback for read attribute value events.

[in]ble_on_read_resp_event

- Callback for read response events.

[in]ble_on_write_resp_event

- Callback for write response events.

[in]ble_on_indicate_confirmation_event

- Callback for indication confirmation events.

[in]ble_on_prepare_write_resp_event

- Callback for prepare write response events.


Definition at line 5723 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_gatt_extended_register_callbacks#

void rsi_ble_gatt_extended_register_callbacks (rsi_ble_on_mtu_exchange_info_t ble_on_mtu_exchange_info_event)

Register the GATT Extended responses/events callbacks.

Parameters
[in]ble_on_mtu_exchange_info_event

ble_on_mtu_exchange_info_event - Call back function for MTU Exchange information Event


Definition at line 5754 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h