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))
int32_t
rsi_ble_adv_ext_events_register_callbacks(uint16_t callback_id, void(*callback_handler_ptr)(uint16_t status, uint8_t *buffer))
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
TypeDirectionArgument NameDescription
rsi_ble_on_adv_report_event_t[in]ble_on_adv_report_event

- Callback function for Advertise events

rsi_ble_on_connect_t[in]ble_on_conn_status_event

- Callback function for Connect events

rsi_ble_on_disconnect_t[in]ble_on_disconnect_event

- Callback function for Disconnect events

rsi_ble_on_le_ping_payload_timeout_t[in]timeout_expired_event

- Callback function for LE ping timeout events

rsi_ble_on_phy_update_complete_t[in]ble_on_phy_update_complete_event

- Callback function for PHY update complete events

rsi_ble_on_data_length_update_t[in]ble_on_data_length_update_complete_event

- Callback function for data length update events

rsi_ble_on_enhance_connect_t[in]ble_on_enhance_conn_status_event

- Callback function for enhanced connection status events

rsi_ble_on_directed_adv_report_event_t[in]ble_on_directed_adv_report_event

- Callback function for directed advertising report events

rsi_ble_on_conn_update_complete_t[in]ble_on_conn_update_complete_event

- Callback function for conn update complete events

rsi_ble_on_remote_conn_params_request_t[in]ble_on_remote_conn_params_request_event

- Callback function to remote conn params request events

Returns

  • void


Definition at line 3832 of file components/si91x/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
TypeDirectionArgument NameDescription
rsi_ble_on_remote_features_t[in]ble_on_remote_features_event

- Call back function for Remote feature request

rsi_ble_on_le_more_data_req_t[in]ble_on_le_more_data_req_event

- Call back function for LE More data request

  • Device should be initialized before calling this API.

Note

  • For more information about each callback, please refer to GAP Extended callbacks description section.

Returns

  • void


Definition at line 3853 of file components/si91x/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)
Parameters
TypeDirectionArgument NameDescription
uint16_tN/Acallback_id
void(*)(uint16_t status, uint8_t *buffer)N/Acallback_handler_ptr

Definition at line 3856 of file components/si91x/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)
Parameters
TypeDirectionArgument NameDescription
uint16_tN/Acallback_id
void(*)(uint16_t status, uint8_t *buffer)N/Acallback_handler_ptr

Definition at line 3864 of file components/si91x/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
TypeDirectionArgument NameDescription
rsi_ble_on_smp_request_t[in]ble_on_smp_request_event

- smp request callback

rsi_ble_on_smp_response_t[in]ble_on_smp_response_event

- smp response callback

rsi_ble_on_smp_passkey_t[in]ble_on_smp_passkey_event

- smp passkey callback

rsi_ble_on_smp_failed_t[in]ble_on_smp_fail_event

- smp failed callback

rsi_ble_on_encrypt_started_t[in]rsi_ble_on_encrypt_started_event

- encryption enabled callback

rsi_ble_on_smp_passkey_display_t[in]ble_on_smp_passkey_display_event

- smp passkey display callback

rsi_ble_on_sc_passkey_t[in]ble_sc_passkey_event

- sc passkey display callback

rsi_ble_on_le_ltk_req_event_t[in]ble_on_le_ltk_req_event

- This is the SMP LTK request callback

rsi_ble_on_le_security_keys_t[in]ble_on_le_security_keys_event

- This is the SMP security keys callback

rsi_ble_on_smp_response_t[in]ble_on_cli_smp_response_event

- sc method display callback

rsi_ble_on_sc_method_tN/Able_on_sc_method_event

Returns

  • void


Definition at line 3882 of file components/si91x/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
TypeDirectionArgument NameDescription
rsi_ble_on_profiles_list_resp_t[in]ble_on_profiles_list_resp

ble_on_profiles_list_resp - Callback for rsi_ble_get_profiles command

rsi_ble_on_profile_resp_t[in]ble_on_profile_resp

ble_on_profile_resp - Callback for rsi_ble_get_profile command

rsi_ble_on_char_services_resp_t[in]ble_on_char_services_resp

ble_on_char_services_resp - Callback for rsi_ble_get_char_services command

rsi_ble_on_inc_services_resp_t[in]ble_on_inc_services_resp

ble_on_inc_services_resp - Callback for rsi_ble_get_inc_services command

rsi_ble_on_att_desc_resp_t[in]ble_on_att_desc_resp

ble_on_att_desc_resp - Callback for rsi_ble_get_att_descriptors command

rsi_ble_on_read_resp_t[in]ble_on_read_resp

ble_on_read_resp - Callback for all read requests command

rsi_ble_on_write_resp_t[in]ble_on_write_resp

ble_on_write_resp - Callback for all write commands

rsi_ble_on_gatt_write_event_t[in]ble_on_gatt_event

blw_on_gatt_event - Callback for all GATT events

rsi_ble_on_gatt_prepare_write_event_t[in]ble_on_gatt_prepare_write_event

ble_on_gatt_error_resp_event - Callback for GATT error events

rsi_ble_on_execute_write_event_t[in]ble_on_execute_write_event

ble_on_gatt_desc_val_resp_event - Callback for GATT descriptor value event

rsi_ble_on_read_req_event_t[in]ble_on_read_req_event

ble_on_profiles_list_event - Callback function for profiles list event

rsi_ble_on_mtu_event_t[in]ble_on_mtu_event

ble_on_profile_by_uuid_event - Callback function for profile event

rsi_ble_on_gatt_error_resp_t[in]ble_on_gatt_error_resp_event

ble_on_read_by_char_services_event- Callback function for char services event

rsi_ble_on_gatt_desc_val_event_t[in]ble_on_gatt_desc_val_resp_event

ble_on_read_by_inc_services_event - Callback function for inc services event

rsi_ble_on_event_profiles_list_t[in]ble_on_profiles_list_event

ble_on_read_att_value_event - Callback function for read att value event

rsi_ble_on_event_profile_by_uuid_t[in]ble_on_profile_by_uuid_event

ble_on_read_resp_event - Callback function for read att event

rsi_ble_on_event_read_by_char_services_t[in]ble_on_read_by_char_services_event

ble_on_write_resp_event - Callback function for write event

rsi_ble_on_event_read_by_inc_services_t[in]ble_on_read_by_inc_services_event

ble_on_indicate_confirmation_event- Callback function for indicate confirmation event

rsi_ble_on_event_read_att_value_t[in]ble_on_read_att_value_event

ble_on_prepare_write_resp_event - Callback function for prepare write event

rsi_ble_on_event_read_resp_tN/Able_on_read_resp_event
rsi_ble_on_event_write_resp_tN/Able_on_write_resp_event
rsi_ble_on_event_indicate_confirmation_tN/Able_on_indicate_confirmation_event
rsi_ble_on_event_prepare_write_resp_tN/Able_on_prepare_write_resp_event

Returns

  • void


Definition at line 4530 of file components/si91x/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
TypeDirectionArgument NameDescription
rsi_ble_on_mtu_exchange_info_t[in]ble_on_mtu_exchange_info_event

ble_on_mtu_exchange_info_event - Call back function for MTU Exchange information Event

Returns

  • void


Definition at line 4561 of file components/si91x/ble/inc/rsi_ble_apis.h