btstack_defines: add GOEP_SUBEVENT_INCOMING_CONNECTION

This commit is contained in:
Matthias Ringwald 2022-04-11 11:52:30 +02:00
parent f4a0ba6977
commit 8c459ced61
2 changed files with 39 additions and 3 deletions

View File

@ -3373,6 +3373,14 @@ typedef uint8_t sm_key_t[16];
#define AVRCP_SUBEVENT_BROWSING_SET_BROWSED_PLAYER 0x36u #define AVRCP_SUBEVENT_BROWSING_SET_BROWSED_PLAYER 0x36u
/**
* @format 12BH
* @param subevent_code
* @param goep_cid
* @param address
* @param handle
*/
#define GOEP_SUBEVENT_INCOMING_CONNECTION 0x01u
/** /**
* @format 121BH1 * @format 121BH1
@ -3383,21 +3391,21 @@ typedef uint8_t sm_key_t[16];
* @param con_handle * @param con_handle
* @param incoming * @param incoming
*/ */
#define GOEP_SUBEVENT_CONNECTION_OPENED 0x01u #define GOEP_SUBEVENT_CONNECTION_OPENED 0x02u
/** /**
* @format 12 * @format 12
* @param subevent_code * @param subevent_code
* @param goep_cid * @param goep_cid
*/ */
#define GOEP_SUBEVENT_CONNECTION_CLOSED 0x02u #define GOEP_SUBEVENT_CONNECTION_CLOSED 0x03u
/** /**
* @format 12 * @format 12
* @param subevent_code * @param subevent_code
* @param goep_cid * @param goep_cid
*/ */
#define GOEP_SUBEVENT_CAN_SEND_NOW 0x03u #define GOEP_SUBEVENT_CAN_SEND_NOW 0x04u
/** /**
* @format 121BH1 * @format 121BH1

View File

@ -10762,6 +10762,34 @@ static inline uint16_t avrcp_subevent_browsing_set_browsed_player_get_player_id(
return little_endian_read_16(event, 5); return little_endian_read_16(event, 5);
} }
/**
* @brief Get field goep_cid from event GOEP_SUBEVENT_INCOMING_CONNECTION
* @param event packet
* @return goep_cid
* @note: btstack_type 2
*/
static inline uint16_t goep_subevent_incoming_connection_get_goep_cid(const uint8_t * event){
return little_endian_read_16(event, 3);
}
/**
* @brief Get field address from event GOEP_SUBEVENT_INCOMING_CONNECTION
* @param event packet
* @param Pointer to storage for address
* @note: btstack_type B
*/
static inline void goep_subevent_incoming_connection_get_address(const uint8_t * event, bd_addr_t address){
reverse_bytes(&event[5], address, 6);
}
/**
* @brief Get field handle from event GOEP_SUBEVENT_INCOMING_CONNECTION
* @param event packet
* @return handle
* @note: btstack_type H
*/
static inline hci_con_handle_t goep_subevent_incoming_connection_get_handle(const uint8_t * event){
return little_endian_read_16(event, 11);
}
/** /**
* @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_OPENED * @brief Get field goep_cid from event GOEP_SUBEVENT_CONNECTION_OPENED
* @param event packet * @param event packet