diff --git a/src/btstack_defines.h b/src/btstack_defines.h index 38ee58da0..7b84b4010 100644 --- a/src/btstack_defines.h +++ b/src/btstack_defines.h @@ -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 diff --git a/src/btstack_event.h b/src/btstack_event.h index e61bda641..9d050b5ef 100644 --- a/src/btstack_event.h +++ b/src/btstack_event.h @@ -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