pbap: add PBAP_SUBEVENT_PHONEBOOK_SIZE event

This commit is contained in:
Matthias Ringwald 2018-08-20 20:30:41 +02:00
parent e69ef7647f
commit fafbca75fd
2 changed files with 37 additions and 0 deletions

View File

@ -2031,6 +2031,15 @@ typedef uint8_t sm_key_t[16];
*/
#define PBAP_SUBEVENT_OPERATION_COMPLETED 0x03
/**
* @format 1212
* @param subevent_code
* @param goep_cid
* @param status
* @param phoneboook_size
*/
#define PBAP_SUBEVENT_PHONEBOOK_SIZE 0x04
// HID Meta Event Group
/**

View File

@ -6478,6 +6478,34 @@ static inline uint8_t pbap_subevent_operation_completed_get_status(const uint8_t
return event[5];
}
/**
* @brief Get field goep_cid from event PBAP_SUBEVENT_PHONEBOOK_SIZE
* @param event packet
* @return goep_cid
* @note: btstack_type 2
*/
static inline uint16_t pbap_subevent_phonebook_size_get_goep_cid(const uint8_t * event){
return little_endian_read_16(event, 3);
}
/**
* @brief Get field status from event PBAP_SUBEVENT_PHONEBOOK_SIZE
* @param event packet
* @return status
* @note: btstack_type 1
*/
static inline uint8_t pbap_subevent_phonebook_size_get_status(const uint8_t * event){
return event[5];
}
/**
* @brief Get field phoneboook_size from event PBAP_SUBEVENT_PHONEBOOK_SIZE
* @param event packet
* @return phoneboook_size
* @note: btstack_type 2
*/
static inline uint16_t pbap_subevent_phonebook_size_get_phoneboook_size(const uint8_t * event){
return little_endian_read_16(event, 6);
}
/**
* @brief Get field hid_cid from event HID_SUBEVENT_CONNECTION_OPENED
* @param event packet