mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-03 20:54:18 +00:00
btstack_defines: add format for HCI_EVENT_IO_CAPABILITY_REQUEST and HCI_EVENT_IO_CAPABILITY_RESPONSE
This commit is contained in:
parent
11b03efaa1
commit
9c2de2bcd6
@ -488,7 +488,19 @@ typedef uint8_t sm_key_t[16];
|
||||
*/
|
||||
#define HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 0x30
|
||||
|
||||
/**
|
||||
* @format B
|
||||
* @param bd_addr
|
||||
*/
|
||||
#define HCI_EVENT_IO_CAPABILITY_REQUEST 0x31
|
||||
|
||||
/**
|
||||
* @format B111
|
||||
* @param bd_addr
|
||||
* @param io_capability
|
||||
* @param oob_data_present
|
||||
* @param authentication_requirements
|
||||
*/
|
||||
#define HCI_EVENT_IO_CAPABILITY_RESPONSE 0x32
|
||||
|
||||
/**
|
||||
|
@ -990,6 +990,53 @@ static inline hci_con_handle_t hci_event_encryption_key_refresh_complete_get_han
|
||||
return little_endian_read_16(event, 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field bd_addr from event HCI_EVENT_IO_CAPABILITY_REQUEST
|
||||
* @param event packet
|
||||
* @param Pointer to storage for bd_addr
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_io_capability_request_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bytes(&event[2], bd_addr, 6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field bd_addr from event HCI_EVENT_IO_CAPABILITY_RESPONSE
|
||||
* @param event packet
|
||||
* @param Pointer to storage for bd_addr
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void hci_event_io_capability_response_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bytes(&event[2], bd_addr, 6);
|
||||
}
|
||||
/**
|
||||
* @brief Get field io_capability from event HCI_EVENT_IO_CAPABILITY_RESPONSE
|
||||
* @param event packet
|
||||
* @return io_capability
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t hci_event_io_capability_response_get_io_capability(const uint8_t * event){
|
||||
return event[8];
|
||||
}
|
||||
/**
|
||||
* @brief Get field oob_data_present from event HCI_EVENT_IO_CAPABILITY_RESPONSE
|
||||
* @param event packet
|
||||
* @return oob_data_present
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t hci_event_io_capability_response_get_oob_data_present(const uint8_t * event){
|
||||
return event[9];
|
||||
}
|
||||
/**
|
||||
* @brief Get field authentication_requirements from event HCI_EVENT_IO_CAPABILITY_RESPONSE
|
||||
* @param event packet
|
||||
* @return authentication_requirements
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t hci_event_io_capability_response_get_authentication_requirements(const uint8_t * event){
|
||||
return event[10];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field bd_addr from event HCI_EVENT_USER_CONFIRMATION_REQUEST
|
||||
* @param event packet
|
||||
|
Loading…
x
Reference in New Issue
Block a user