btstack_defines: add events for SPP-like GATT services

This commit is contained in:
Matthias Ringwald 2021-03-20 16:46:53 +01:00
parent 37a7ced06e
commit f8aace927f
2 changed files with 34 additions and 0 deletions

View File

@ -3192,6 +3192,20 @@ typedef uint8_t sm_key_t[16];
*/
#define GATTSERVICE_SUBEVENT_SCAN_PARAMETERS_SERVICE_CONNECTED 0x10
/**
* @format 1H
* @param subevent_code
* @param con_handle
*/
#define GATTSERVICE_SUBEVENT_SPP_SERVICE_CONNECTED 0x11
/**
* @format 1H
* @param subevent_code
* @param con_handle
*/
#define GATTSERVICE_SUBEVENT_SPP_SERVICE_DISCONNECTED 0x12
// MAP Meta Event Group

View File

@ -9493,6 +9493,26 @@ static inline uint8_t gattservice_subevent_scan_parameters_service_connected_get
return event[5];
}
/**
* @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SPP_SERVICE_CONNECTED
* @param event packet
* @return con_handle
* @note: btstack_type H
*/
static inline hci_con_handle_t gattservice_subevent_spp_service_connected_get_con_handle(const uint8_t * event){
return little_endian_read_16(event, 3);
}
/**
* @brief Get field con_handle from event GATTSERVICE_SUBEVENT_SPP_SERVICE_DISCONNECTED
* @param event packet
* @return con_handle
* @note: btstack_type H
*/
static inline hci_con_handle_t gattservice_subevent_spp_service_disconnected_get_con_handle(const uint8_t * event){
return little_endian_read_16(event, 3);
}
/**
* @brief Get field map_cid from event MAP_SUBEVENT_CONNECTION_OPENED
* @param event packet