mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-24 04:43:36 +00:00
btstack_event: enable getters for HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
This commit is contained in:
parent
d79faacd66
commit
47430bed98
@ -350,27 +350,27 @@ static inline uint16_t hci_event_authentication_complete_event_get_connection_ha
|
||||
* @return status
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
// static inline uint8_t hci_event_remote_name_request_complete_get_status(const uint8_t * event){
|
||||
// not implemented yet
|
||||
// }
|
||||
static inline uint8_t hci_event_remote_name_request_complete_get_status(const uint8_t * event){
|
||||
return event[2];
|
||||
}
|
||||
/**
|
||||
* @brief Get field bd_addr from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
|
||||
* @param event packet
|
||||
* @return bd_addr
|
||||
* @param Pointer to storage for bd_addr
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
// static inline bd_addr_t hci_event_remote_name_request_complete_get_bd_addr(const uint8_t * event){
|
||||
// not implemented yet
|
||||
// }
|
||||
static inline void hci_event_remote_name_request_complete_get_bd_addr(const uint8_t * event, bd_addr_t bd_addr){
|
||||
reverse_bd_addr(&event[3], bd_addr);
|
||||
}
|
||||
/**
|
||||
* @brief Get field remote_name from event HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
|
||||
* @param event packet
|
||||
* @return remote_name
|
||||
* @note: btstack_type N
|
||||
*/
|
||||
// static inline String hci_event_remote_name_request_complete_get_remote_name(const uint8_t * event){
|
||||
// not implemented yet
|
||||
// }
|
||||
static inline const char * hci_event_remote_name_request_complete_get_remote_name(const uint8_t * event){
|
||||
return (const char *) &event[9];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field status from event HCI_EVENT_ENCRYPTION_CHANGE
|
||||
|
@ -185,17 +185,19 @@ param_read = {
|
||||
'H' : 'return little_endian_read_16(event, {offset});',
|
||||
'B' : 'reverse_bd_addr(&event[{offset}], {result_name});',
|
||||
'R' : 'return &event[{offset}];',
|
||||
'N' : 'return (const char *) &event[{offset}];',
|
||||
'T' : 'return (const char *) &event[{offset}];',
|
||||
'Q' : 'reverse_bytes(&event[{offset}], {result_name}, 32);',
|
||||
'V' : 'return &event[{offset}];',
|
||||
'X' : 'gatt_client_deserialize_service(event, {offset}, {result_name});',
|
||||
'Y' : 'gatt_client_deserialize_characteristic(event, {offset}, {result_name});',
|
||||
'Z' : 'gatt_client_deserialize_characteristic_descriptor(event, {offset}, {result_name});',
|
||||
'V' : 'return &event[{offset}];',
|
||||
}
|
||||
|
||||
def c_type_for_btstack_type(type):
|
||||
param_types = { '1' : 'uint8_t', '2' : 'uint16_t', '3' : 'uint32_t', '4' : 'uint32_t', 'H' : 'hci_con_handle_t', 'B' : 'bd_addr_t',
|
||||
'D' : 'const uint8_t *', 'E' : 'const uint8_t * ', 'N' : 'String' , 'P' : 'const uint8_t *', 'A' : 'const uint8_t *',
|
||||
'D' : 'const uint8_t *', 'E' : 'const uint8_t * ', 'N' : 'const char *' , 'P' : 'const uint8_t *', 'A' : 'const uint8_t *',
|
||||
'R' : 'const uint8_t *', 'S' : 'const uint8_t *',
|
||||
'J' : 'int', 'L' : 'int', 'V' : 'const uint8_t *', 'U' : 'BT_UUID',
|
||||
'Q' : 'uint8_t *',
|
||||
|
Loading…
x
Reference in New Issue
Block a user