mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-27 06:35:20 +00:00
Merge branch 'develop' of https://github.com/bluekitchen/btstack into develop
This commit is contained in:
commit
bf7f6bafe9
@ -179,7 +179,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
|
||||
}
|
||||
break;
|
||||
case ATT_EVENT_MTU_EXCHANGE_COMPLETE:
|
||||
mtu = little_endian_read_16(packet, 4) - 3;
|
||||
mtu = att_event_mtu_exchange_complete_get_MTU(packet) - 3;
|
||||
printf("ATT MTU = %u\n", mtu);
|
||||
test_data_len = mtu - 3;
|
||||
break;
|
||||
|
@ -779,10 +779,18 @@ typedef uint8_t sm_key_t[16];
|
||||
|
||||
// GAP
|
||||
|
||||
// data: event(8), len(8), hci_handle (16), security_level (8)
|
||||
/**
|
||||
* @format H1
|
||||
* @param handle
|
||||
* @param security_level
|
||||
*/
|
||||
#define GAP_EVENT_SECURITY_LEVEL 0xE0
|
||||
|
||||
// data: event(8), len(8), status (8), bd_addr(48)
|
||||
/**
|
||||
* @format 1B
|
||||
* @param status
|
||||
* @param address
|
||||
*/
|
||||
#define GAP_EVENT_DEDICATED_BONDING_COMPLETED 0xE1
|
||||
|
||||
/**
|
||||
|
@ -2357,6 +2357,44 @@ static inline uint8_t sm_event_authorization_result_get_authorization_result(con
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get field handle from event GAP_EVENT_SECURITY_LEVEL
|
||||
* @param event packet
|
||||
* @return handle
|
||||
* @note: btstack_type H
|
||||
*/
|
||||
static inline hci_con_handle_t gap_event_security_level_get_handle(const uint8_t * event){
|
||||
return little_endian_read_16(event, 2);
|
||||
}
|
||||
/**
|
||||
* @brief Get field security_level from event GAP_EVENT_SECURITY_LEVEL
|
||||
* @param event packet
|
||||
* @return security_level
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t gap_event_security_level_get_security_level(const uint8_t * event){
|
||||
return event[4];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field status from event GAP_EVENT_DEDICATED_BONDING_COMPLETED
|
||||
* @param event packet
|
||||
* @return status
|
||||
* @note: btstack_type 1
|
||||
*/
|
||||
static inline uint8_t gap_event_dedicated_bonding_completed_get_status(const uint8_t * event){
|
||||
return event[2];
|
||||
}
|
||||
/**
|
||||
* @brief Get field address from event GAP_EVENT_DEDICATED_BONDING_COMPLETED
|
||||
* @param event packet
|
||||
* @param Pointer to storage for address
|
||||
* @note: btstack_type B
|
||||
*/
|
||||
static inline void gap_event_dedicated_bonding_completed_get_address(const uint8_t * event, bd_addr_t address){
|
||||
reverse_bd_addr(&event[3], address);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field advertising_event_type from event GAP_EVENT_ADVERTISING_REPORT
|
||||
* @param event packet
|
||||
|
Loading…
x
Reference in New Issue
Block a user