events: add params for BTSTACK_EVENT_NR_CONNECTIONS_CHANGED

This commit is contained in:
Matthias Ringwald 2017-03-12 21:21:16 +01:00
parent fe53f27bc6
commit 723a9de2e2
2 changed files with 14 additions and 1 deletions

View File

@ -276,7 +276,10 @@ typedef uint8_t sm_key_t[16];
*/
#define BTSTACK_EVENT_STATE 0x60
// data: event(8), len(8), nr hci connections
/**
* @format 1
* @param number_connections
*/
#define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 0x61
/**

View File

@ -932,6 +932,16 @@ static inline uint8_t btstack_event_state_get_state(const uint8_t * event){
return event[2];
}
/**
* @brief Get field number_connections from event BTSTACK_EVENT_NR_CONNECTIONS_CHANGED
* @param event packet
* @return number_connections
* @note: btstack_type 1
*/
static inline uint8_t btstack_event_nr_connections_changed_get_number_connections(const uint8_t * event){
return event[2];
}
/**
* @brief Get field discoverable from event BTSTACK_EVENT_DISCOVERABLE_ENABLED