mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
btstack_event: add SM_EVENT_PAIRING_COMPLETE
This commit is contained in:
parent
589f5a99a3
commit
36c1abd2e3
@ -935,6 +935,23 @@ typedef uint8_t sm_key_t[16];
|
||||
*/
|
||||
#define SM_EVENT_IDENTITY_CREATED 0xDE
|
||||
|
||||
/**
|
||||
* @brief Emitted to inform app that pairing is complete. Possible status values:
|
||||
* ERROR_CODE_SUCCESS -> pairing success
|
||||
* ERROR_CODE_CONNECTION_TIMEOUT -> timeout
|
||||
* ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION -> disconnect
|
||||
* ERROR_CODE_AUTHENTICATION_FAILURE -> SM protocol error, see reason field with SM_REASON_* from bluetooth.h
|
||||
*
|
||||
* @format H1B11
|
||||
* @param handle
|
||||
* @param addr_type
|
||||
* @param address
|
||||
* @param status
|
||||
* @param reason if status == ERROR_CODE_AUTHENTICATION_FAILURE
|
||||
*/
|
||||
#define SM_EVENT_PAIRING_COMPLETE 0xDF
|
||||
|
||||
|
||||
// GAP
|
||||
|
||||
/**
|
||||
|
@ -183,7 +183,7 @@ static inline uint8_t hci_event_inquiry_result_get_num_responses(const uint8_t *
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT
|
||||
@ -256,7 +256,7 @@ static inline uint16_t hci_event_connection_complete_get_connection_handle(const
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field link_type from event HCI_EVENT_CONNECTION_COMPLETE
|
||||
@ -284,7 +284,7 @@ static inline uint8_t hci_event_connection_complete_get_encryption_enabled(const
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_connection_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field class_of_device from event HCI_EVENT_CONNECTION_REQUEST
|
||||
@ -368,7 +368,7 @@ static inline uint8_t hci_event_remote_name_request_complete_get_status(const ui
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_remote_name_request_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field remote_name from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
|
||||
@ -537,7 +537,7 @@ static inline uint8_t hci_event_role_change_get_status(const uint8_t * event){
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_role_change_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field role from event HCI_EVENT_ROLE_CHANGE
|
||||
@ -593,7 +593,7 @@ static inline uint16_t hci_event_mode_change_event_get_interval(const uint8_t *
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_pin_code_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -603,7 +603,7 @@ static inline void hci_event_pin_code_request_get_bd_addr(const uint8_t * event,
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_link_key_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -707,7 +707,7 @@ static inline uint8_t hci_event_inquiry_result_with_rssi_get_num_responses(const
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_inquiry_result_with_rssi_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field page_scan_repetition_mode from event HCI_EVENT_INQUIRY_RESULT_WITH_RSSI
|
||||
@ -780,7 +780,7 @@ static inline hci_con_handle_t hci_event_synchronous_connection_complete_get_han
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_synchronous_connection_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field link_type from event HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE
|
||||
@ -853,7 +853,7 @@ static inline uint8_t hci_event_extended_inquiry_response_get_num_responses(cons
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_extended_inquiry_response_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field page_scan_repetition_mode from event HCI_EVENT_EXTENDED_INQUIRY_RESPONSE
|
||||
@ -927,7 +927,7 @@ static inline hci_con_handle_t hci_event_encryption_key_refresh_complete_get_han
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_user_confirmation_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field numeric_value from event HCI_EVENT_USER_CONFIRMATION_REQUEST
|
||||
@ -946,7 +946,7 @@ static inline uint32_t hci_event_user_confirmation_request_get_numeric_value(con
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_user_passkey_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -956,7 +956,7 @@ static inline void hci_event_user_passkey_request_get_bd_addr(const uint8_t * ev
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_remote_oob_data_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -975,7 +975,7 @@ static inline uint8_t hci_event_simple_pairing_complete_get_status(const uint8_t
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_simple_pairing_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1026,7 +1026,7 @@ static inline uint8_t hci_event_transport_sleep_mode_get_active(const uint8_t *
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_sco_can_send_now_get_handle(const uint8_t * event, bd_addr_t handle){
|
||||
reverse_bd_addr(&event[2], handle);
|
||||
reverse_bd_addr(&event[2], handle);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1045,7 +1045,7 @@ static inline uint8_t l2cap_event_channel_opened_get_status(const uint8_t * even
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void l2cap_event_channel_opened_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[3], address);
|
||||
reverse_bd_addr(&event[3], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field handle from event L2CAP_EVENT_CHANNEL_OPENED
|
||||
@ -1137,7 +1137,7 @@ static inline uint16_t l2cap_event_channel_closed_get_local_cid(const uint8_t *
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void l2cap_event_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[2], address);
|
||||
reverse_bd_addr(&event[2], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field handle from event L2CAP_EVENT_INCOMING_CONNECTION
|
||||
@ -1267,7 +1267,7 @@ static inline uint8_t l2cap_event_le_incoming_connection_get_address_type(const
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void l2cap_event_le_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[3], address);
|
||||
reverse_bd_addr(&event[3], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field handle from event L2CAP_EVENT_LE_INCOMING_CONNECTION
|
||||
@ -1340,7 +1340,7 @@ static inline uint8_t l2cap_event_le_channel_opened_get_address_type(const uint8
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void l2cap_event_le_channel_opened_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[4], address);
|
||||
reverse_bd_addr(&event[4], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field handle from event L2CAP_EVENT_LE_CHANNEL_OPENED
|
||||
@ -1452,7 +1452,7 @@ static inline uint8_t rfcomm_event_channel_opened_get_status(const uint8_t * eve
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void rfcomm_event_channel_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field con_handle from event RFCOMM_EVENT_CHANNEL_OPENED
|
||||
@ -1517,7 +1517,7 @@ static inline uint16_t rfcomm_event_channel_closed_get_rfcomm_cid(const uint8_t
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void rfcomm_event_incoming_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field server_channel from event RFCOMM_EVENT_INCOMING_CONNECTION
|
||||
@ -1764,7 +1764,7 @@ static inline hci_con_handle_t gatt_event_service_query_result_get_handle(const
|
||||
* @note: btstack_type X
|
||||
*/
|
||||
static inline void gatt_event_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){
|
||||
gatt_client_deserialize_service(event, 4, service);
|
||||
gatt_client_deserialize_service(event, 4, service);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1785,7 +1785,7 @@ static inline hci_con_handle_t gatt_event_characteristic_query_result_get_handle
|
||||
* @note: btstack_type Y
|
||||
*/
|
||||
static inline void gatt_event_characteristic_query_result_get_characteristic(const uint8_t * event, gatt_client_characteristic_t * characteristic){
|
||||
gatt_client_deserialize_characteristic(event, 4, characteristic);
|
||||
gatt_client_deserialize_characteristic(event, 4, characteristic);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1815,7 +1815,7 @@ static inline uint16_t gatt_event_included_service_query_result_get_include_hand
|
||||
* @note: btstack_type X
|
||||
*/
|
||||
static inline void gatt_event_included_service_query_result_get_service(const uint8_t * event, gatt_client_service_t * service){
|
||||
gatt_client_deserialize_service(event, 6, service);
|
||||
gatt_client_deserialize_service(event, 6, service);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1836,7 +1836,7 @@ static inline hci_con_handle_t gatt_event_all_characteristic_descriptors_query_r
|
||||
* @note: btstack_type Z
|
||||
*/
|
||||
static inline void gatt_event_all_characteristic_descriptors_query_result_get_characteristic_descriptor(const uint8_t * event, gatt_client_characteristic_descriptor_t * characteristic_descriptor){
|
||||
gatt_client_deserialize_characteristic_descriptor(event, 4, characteristic_descriptor);
|
||||
gatt_client_deserialize_characteristic_descriptor(event, 4, characteristic_descriptor);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2235,7 +2235,7 @@ static inline uint16_t bnep_event_channel_opened_get_mtu(const uint8_t * event){
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void bnep_event_channel_opened_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
|
||||
reverse_bd_addr(&event[11], remote_address);
|
||||
reverse_bd_addr(&event[11], remote_address);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2272,7 +2272,7 @@ static inline uint16_t bnep_event_channel_closed_get_destination_uuid(const uint
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void bnep_event_channel_closed_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
|
||||
reverse_bd_addr(&event[8], remote_address);
|
||||
reverse_bd_addr(&event[8], remote_address);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2309,7 +2309,7 @@ static inline uint16_t bnep_event_channel_timeout_get_destination_uuid(const uin
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void bnep_event_channel_timeout_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
|
||||
reverse_bd_addr(&event[8], remote_address);
|
||||
reverse_bd_addr(&event[8], remote_address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field channel_state from event BNEP_EVENT_CHANNEL_TIMEOUT
|
||||
@ -2355,7 +2355,7 @@ static inline uint16_t bnep_event_can_send_now_get_destination_uuid(const uint8_
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void bnep_event_can_send_now_get_remote_address(const uint8_t * event, bd_addr_t remote_address){
|
||||
reverse_bd_addr(&event[8], remote_address);
|
||||
reverse_bd_addr(&event[8], remote_address);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_BLE
|
||||
@ -2384,7 +2384,7 @@ static inline uint8_t sm_event_just_works_request_get_addr_type(const uint8_t *
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_just_works_request_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2414,7 +2414,7 @@ static inline uint8_t sm_event_just_works_cancel_get_addr_type(const uint8_t * e
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_just_works_cancel_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2444,7 +2444,7 @@ static inline uint8_t sm_event_passkey_display_number_get_addr_type(const uint8_
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_passkey_display_number_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field passkey from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
|
||||
@ -2483,7 +2483,7 @@ static inline uint8_t sm_event_passkey_display_cancel_get_addr_type(const uint8_
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_passkey_display_cancel_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2513,7 +2513,7 @@ static inline uint8_t sm_event_passkey_input_number_get_addr_type(const uint8_t
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_passkey_input_number_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2543,7 +2543,7 @@ static inline uint8_t sm_event_passkey_input_cancel_get_addr_type(const uint8_t
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_passkey_input_cancel_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2573,7 +2573,7 @@ static inline uint8_t sm_event_numeric_comparison_request_get_addr_type(const ui
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_numeric_comparison_request_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field passkey from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
|
||||
@ -2612,7 +2612,7 @@ static inline uint8_t sm_event_numeric_comparison_cancel_get_addr_type(const uin
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_numeric_comparison_cancel_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2642,7 +2642,7 @@ static inline uint8_t sm_event_identity_resolving_started_get_addr_type(const ui
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_identity_resolving_started_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2672,7 +2672,7 @@ static inline uint8_t sm_event_identity_resolving_failed_get_addr_type(const uin
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_identity_resolving_failed_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2702,7 +2702,7 @@ static inline uint8_t sm_event_identity_resolving_succeeded_get_addr_type(const
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_identity_resolving_succeeded_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
|
||||
@ -2720,7 +2720,7 @@ static inline uint8_t sm_event_identity_resolving_succeeded_get_identity_addr_ty
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_identity_resolving_succeeded_get_identity_address(const uint8_t * event, bd_addr_t identity_address){
|
||||
reverse_bd_addr(&event[12], identity_address);
|
||||
reverse_bd_addr(&event[12], identity_address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field index from event SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED
|
||||
@ -2759,7 +2759,7 @@ static inline uint8_t sm_event_authorization_request_get_addr_type(const uint8_t
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_authorization_request_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2789,7 +2789,7 @@ static inline uint8_t sm_event_authorization_result_get_addr_type(const uint8_t
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_authorization_result_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field authorization_result from event SM_EVENT_AUTHORIZATION_RESULT
|
||||
@ -2849,7 +2849,7 @@ static inline uint8_t sm_event_identity_created_get_addr_type(const uint8_t * ev
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_identity_created_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field identity_addr_type from event SM_EVENT_IDENTITY_CREATED
|
||||
@ -2867,7 +2867,7 @@ static inline uint8_t sm_event_identity_created_get_identity_addr_type(const uin
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_identity_created_get_identity_address(const uint8_t * event, bd_addr_t identity_address){
|
||||
reverse_bd_addr(&event[12], identity_address);
|
||||
reverse_bd_addr(&event[12], identity_address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field index from event SM_EVENT_IDENTITY_CREATED
|
||||
@ -2880,6 +2880,54 @@ static inline uint8_t sm_event_identity_created_get_index(const uint8_t * event)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_BLE
|
||||
/**
|
||||
* @brief Get field handle from event SM_EVENT_PAIRING_COMPLETE
|
||||
* @param event packet
|
||||
* @return handle
|
||||
* @note: btstack_type H
|
||||
*/
|
||||
static inline hci_con_handle_t sm_event_pairing_complete_get_handle(const uint8_t * event){
|
||||
return little_endian_read_16(event, 2);
|
||||
}
|
||||
/**
|
||||
* @brief Get field addr_type from event SM_EVENT_PAIRING_COMPLETE
|
||||
* @param event packet
|
||||
* @return addr_type
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t sm_event_pairing_complete_get_addr_type(const uint8_t * event){
|
||||
return event[4];
|
||||
}
|
||||
/**
|
||||
* @brief Get field address from event SM_EVENT_PAIRING_COMPLETE
|
||||
* @param event packet
|
||||
* @param Pointer to storage for address
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void sm_event_pairing_complete_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[5], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field status from event SM_EVENT_PAIRING_COMPLETE
|
||||
* @param event packet
|
||||
* @return status
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t sm_event_pairing_complete_get_status(const uint8_t * event){
|
||||
return event[11];
|
||||
}
|
||||
/**
|
||||
* @brief Get field reason from event SM_EVENT_PAIRING_COMPLETE
|
||||
* @param event packet
|
||||
* @return reason
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t sm_event_pairing_complete_get_reason(const uint8_t * event){
|
||||
return event[12];
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL
|
||||
* @param event packet
|
||||
@ -2915,7 +2963,7 @@ static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uin
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[3], address);
|
||||
reverse_bd_addr(&event[3], address);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2943,7 +2991,7 @@ static inline uint8_t gap_event_advertising_report_get_address_type(const uint8_
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void gap_event_advertising_report_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[4], address);
|
||||
reverse_bd_addr(&event[4], address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field rssi from event GAP_EVENT_ADVERTISING_REPORT
|
||||
@ -2980,7 +3028,7 @@ static inline const uint8_t * gap_event_advertising_report_get_data(const uint8_
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void gap_event_inquiry_result_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
reverse_bd_addr(&event[2], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field page_scan_repetition_mode from event GAP_EVENT_INQUIRY_RESULT
|
||||
@ -3108,7 +3156,7 @@ static inline uint8_t hci_subevent_le_connection_complete_get_peer_address_type(
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_subevent_le_connection_complete_get_peer_address(const uint8_t * event, bd_addr_t peer_address){
|
||||
reverse_bd_addr(&event[8], peer_address);
|
||||
reverse_bd_addr(&event[8], peer_address);
|
||||
}
|
||||
/**
|
||||
* @brief Get field conn_interval from event HCI_SUBEVENT_LE_CONNECTION_COMPLETE
|
||||
@ -3357,7 +3405,7 @@ static inline uint8_t hci_subevent_le_read_local_p256_public_key_complete_get_st
|
||||
* @note: btstack_type Q
|
||||
*/
|
||||
static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(const uint8_t * event, uint8_t * dhkey_x){
|
||||
reverse_bytes(&event[4], dhkey_x, 32);
|
||||
reverse_bytes(&event[4], dhkey_x, 32);
|
||||
}
|
||||
/**
|
||||
* @brief Get field dhkey_y from event HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE
|
||||
@ -3366,7 +3414,7 @@ static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey
|
||||
* @note: btstack_type Q
|
||||
*/
|
||||
static inline void hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(const uint8_t * event, uint8_t * dhkey_y){
|
||||
reverse_bytes(&event[36], dhkey_y, 32);
|
||||
reverse_bytes(&event[36], dhkey_y, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3385,7 +3433,7 @@ static inline uint8_t hci_subevent_le_generate_dhkey_complete_get_status(const u
|
||||
* @note: btstack_type Q
|
||||
*/
|
||||
static inline void hci_subevent_le_generate_dhkey_complete_get_dhkey(const uint8_t * event, uint8_t * dhkey){
|
||||
reverse_bytes(&event[4], dhkey, 32);
|
||||
reverse_bytes(&event[4], dhkey, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3431,7 +3479,7 @@ static inline uint8_t hci_subevent_le_enhanced_connection_complete_get_peer_addr
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_subevent_le_enhanced_connection_complete_get_perr_addresss(const uint8_t * event, bd_addr_t perr_addresss){
|
||||
reverse_bd_addr(&event[8], perr_addresss);
|
||||
reverse_bd_addr(&event[8], perr_addresss);
|
||||
}
|
||||
/**
|
||||
* @brief Get field local_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
|
||||
@ -3440,7 +3488,7 @@ static inline void hci_subevent_le_enhanced_connection_complete_get_perr_address
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_subevent_le_enhanced_connection_complete_get_local_resolvable_private_addres(const uint8_t * event, bd_addr_t local_resolvable_private_addres){
|
||||
reverse_bd_addr(&event[14], local_resolvable_private_addres);
|
||||
reverse_bd_addr(&event[14], local_resolvable_private_addres);
|
||||
}
|
||||
/**
|
||||
* @brief Get field peer_resolvable_private_addres from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
|
||||
@ -3449,7 +3497,7 @@ static inline void hci_subevent_le_enhanced_connection_complete_get_local_resolv
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_subevent_le_enhanced_connection_complete_get_peer_resolvable_private_addres(const uint8_t * event, bd_addr_t peer_resolvable_private_addres){
|
||||
reverse_bd_addr(&event[20], peer_resolvable_private_addres);
|
||||
reverse_bd_addr(&event[20], peer_resolvable_private_addres);
|
||||
}
|
||||
/**
|
||||
* @brief Get field conn_interval from event HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE
|
||||
@ -3621,7 +3669,7 @@ static inline hci_con_handle_t hfp_subevent_service_level_connection_established
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hfp_subevent_service_level_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
}
|
||||
|
||||
|
||||
@ -3650,7 +3698,7 @@ static inline hci_con_handle_t hfp_subevent_audio_connection_established_get_han
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hfp_subevent_audio_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field negotiated_codec from event HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED
|
||||
@ -4099,7 +4147,7 @@ static inline uint16_t avdtp_subevent_signaling_connection_established_get_avdtp
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void avdtp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field status from event AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
|
||||
@ -4887,7 +4935,7 @@ static inline uint16_t avdtp_subevent_streaming_connection_established_get_avdtp
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void avdtp_subevent_streaming_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field local_seid from event AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED
|
||||
@ -5190,7 +5238,7 @@ static inline uint16_t a2dp_subevent_stream_established_get_a2dp_cid(const uint8
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void a2dp_subevent_stream_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field local_seid from event A2DP_SUBEVENT_STREAM_ESTABLISHED
|
||||
@ -5368,7 +5416,7 @@ static inline uint16_t a2dp_subevent_signaling_connection_established_get_a2dp_c
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void a2dp_subevent_signaling_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
reverse_bd_addr(&event[5], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field status from event A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED
|
||||
@ -5406,7 +5454,7 @@ static inline uint8_t avrcp_subevent_connection_established_get_status(const uin
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void avrcp_subevent_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[4], bd_addr);
|
||||
reverse_bd_addr(&event[4], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field avrcp_cid from event AVRCP_SUBEVENT_CONNECTION_ESTABLISHED
|
||||
@ -6089,7 +6137,7 @@ static inline uint8_t avrcp_subevent_now_playing_info_done_get_status(const uint
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void avrcp_subevent_incoming_browsing_connection_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field browsing_cid from event AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION
|
||||
@ -6117,7 +6165,7 @@ static inline uint8_t avrcp_subevent_browsing_connection_established_get_status(
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void avrcp_subevent_browsing_connection_established_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[4], bd_addr);
|
||||
reverse_bd_addr(&event[4], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field browsing_cid from event AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED
|
||||
@ -6192,7 +6240,7 @@ static inline uint8_t goep_subevent_connection_opened_get_status(const uint8_t *
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void goep_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field con_handle from event GOEP_SUBEVENT_CONNECTION_OPENED
|
||||
@ -6258,7 +6306,7 @@ static inline uint8_t pbap_subevent_connection_opened_get_status(const uint8_t *
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void pbap_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field con_handle from event PBAP_SUBEVENT_CONNECTION_OPENED
|
||||
@ -6333,7 +6381,7 @@ static inline uint8_t hid_subevent_connection_opened_get_status(const uint8_t *
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hid_subevent_connection_opened_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
reverse_bd_addr(&event[6], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field con_handle from event HID_SUBEVENT_CONNECTION_OPENED
|
||||
|
Loading…
x
Reference in New Issue
Block a user