btstack_defines: add status field to HID_SUBEVENT_INCOMING_CONNECTION

This commit is contained in:
Matthias Ringwald 2025-02-24 10:43:00 +01:00
parent 5aec0214d7
commit 5aa9adcbfc
3 changed files with 25 additions and 14 deletions

View File

@ -3916,11 +3916,12 @@ typedef uint8_t sm_key_t[16];
// HID Meta Event Group
/**
* @format 12BH
* @format 12BH1
* @param subevent_code
* @param hid_cid
* @param address
* @param handle
* @param status
*/
#define HID_SUBEVENT_INCOMING_CONNECTION 0x01u

View File

@ -8984,9 +8984,9 @@ static inline uint16_t avdtp_subevent_signaling_media_codec_sbc_configuration_ge
return little_endian_read_16(event, 9);
}
/**
* @brief Get field channels_num from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
* @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
* @param event packet
* @return channels_num
* @return channel_mode
* @note: btstack_type 1
*/
static inline uint8_t avdtp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){
@ -9111,9 +9111,9 @@ static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configurat
return event[10];
}
/**
* @brief Get field channels_num from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION
* @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION
* @param event packet
* @return channels_num
* @return channel_mode
* @note: btstack_type 1
*/
static inline uint8_t avdtp_subevent_signaling_media_codec_mpeg_audio_configuration_get_channel_mode(const uint8_t * event){
@ -9320,9 +9320,9 @@ static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_g
return event[9];
}
/**
* @brief Get field channels_num from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION
* @brief Get field channel_mode from event AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION
* @param event packet
* @return channels_num
* @return channel_mode
* @note: btstack_type 1
*/
static inline uint8_t avdtp_subevent_signaling_media_codec_atrac_configuration_get_channel_mode(const uint8_t * event){
@ -9816,9 +9816,9 @@ static inline uint16_t a2dp_subevent_signaling_media_codec_sbc_configuration_get
return little_endian_read_16(event, 9);
}
/**
* @brief Get field channels_num from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
* @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION
* @param event packet
* @return channels_num
* @return channel_mode
* @note: btstack_type 1
*/
static inline uint8_t a2dp_subevent_signaling_media_codec_sbc_configuration_get_channel_mode(const uint8_t * event){
@ -9943,9 +9943,9 @@ static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configurati
return event[10];
}
/**
* @brief Get field channels_num from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION
* @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_MPEG_AUDIO_CONFIGURATION
* @param event packet
* @return channels_num
* @return channel_mode
* @note: btstack_type 1
*/
static inline uint8_t a2dp_subevent_signaling_media_codec_mpeg_audio_configuration_get_channel_mode(const uint8_t * event){
@ -10152,9 +10152,9 @@ static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_ge
return event[9];
}
/**
* @brief Get field channels_num from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION
* @brief Get field channel_mode from event A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_ATRAC_CONFIGURATION
* @param event packet
* @return channels_num
* @return channel_mode
* @note: btstack_type 1
*/
static inline uint8_t a2dp_subevent_signaling_media_codec_atrac_configuration_get_channel_mode(const uint8_t * event){
@ -13165,6 +13165,15 @@ static inline void hid_subevent_incoming_connection_get_address(const uint8_t *
static inline hci_con_handle_t hid_subevent_incoming_connection_get_handle(const uint8_t * event){
return little_endian_read_16(event, 11);
}
/**
* @brief Get field status from event HID_SUBEVENT_INCOMING_CONNECTION
* @param event packet
* @return status
* @note: btstack_type 1
*/
static inline uint8_t hid_subevent_incoming_connection_get_status(const uint8_t * event){
return event[13];
}
/**
* @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_OPENED

View File

@ -273,7 +273,7 @@ static void hid_emit_set_protocol_response_event(hid_host_connection_t * connect
}
static void hid_emit_incoming_connection_event(hid_host_connection_t * connection){
uint8_t event[13];
uint8_t event[14];
uint16_t pos = 0;
event[pos++] = HCI_EVENT_HID_META;
pos++; // skip len
@ -284,6 +284,7 @@ static void hid_emit_incoming_connection_event(hid_host_connection_t * connectio
pos += 6;
little_endian_store_16(event,pos,connection->con_handle);
pos += 2;
event[pos++] = ERROR_CODE_SUCCESS;
event[1] = pos - 2;
hid_host_callback(HCI_EVENT_PACKET, connection->hid_cid, &event[0], pos);
}