bluetooth: remove event suffix in HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT and HCI_EVENT_MODE_CHANGE_EVENT

This commit is contained in:
Matthias Ringwald 2018-10-22 12:20:17 +02:00
parent c33e56d3e0
commit 51fd61e9d5
2 changed files with 23 additions and 14 deletions

View File

@ -301,6 +301,11 @@ typedef enum {
#define LM_LINK_POLICY_ENABLE_HOLD_MODE 2
#define LM_LINK_POLICY_ENABLE_SNIFF_MODE 3
// ACL Connection Modes
#define ACL_CONNECTION_MODE_ACTIVE 0
#define ACL_CONNECTION_MODE_HOLD 1
#define ACL_CONNECTION_MODE_SNIFF 2
/**
* Default INQ Mode
*/
@ -399,7 +404,11 @@ typedef enum {
* @param status
* @param connection_handle
*/
#define HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT 0x06
#define HCI_EVENT_AUTHENTICATION_COMPLETE 0x06
// HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT is deprecated, use HCI_EVENT_AUTHENTICATION_COMPLETE instead
#define HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT HCI_EVENT_AUTHENTICATION_COMPLETE
/**
* @format 1BN
* @param status
@ -475,7 +484,7 @@ typedef enum {
* @param mode
* @param interval
*/
#define HCI_EVENT_MODE_CHANGE_EVENT 0x14
#define HCI_EVENT_MODE_CHANGE 0x14
// TODO: num_keys, bd_addr[B*i], link_key[16 octets * i]
#define HCI_EVENT_RETURN_LINK_KEYS 0x15

View File

@ -334,21 +334,21 @@ static inline uint8_t hci_event_disconnection_complete_get_reason(const uint8_t
}
/**
* @brief Get field status from event HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT
* @brief Get field status from event HCI_EVENT_AUTHENTICATION_COMPLETE
* @param event packet
* @return status
* @note: btstack_type 1
*/
static inline uint8_t hci_event_authentication_complete_event_get_status(const uint8_t * event){
static inline uint8_t hci_event_authentication_complete_get_status(const uint8_t * event){
return event[2];
}
/**
* @brief Get field connection_handle from event HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT
* @brief Get field connection_handle from event HCI_EVENT_AUTHENTICATION_COMPLETE
* @param event packet
* @return connection_handle
* @note: btstack_type 2
*/
static inline uint16_t hci_event_authentication_complete_event_get_connection_handle(const uint8_t * event){
static inline uint16_t hci_event_authentication_complete_get_connection_handle(const uint8_t * event){
return little_endian_read_16(event, 3);
}
@ -550,39 +550,39 @@ static inline uint8_t hci_event_role_change_get_role(const uint8_t * event){
}
/**
* @brief Get field status from event HCI_EVENT_MODE_CHANGE_EVENT
* @brief Get field status from event HCI_EVENT_MODE_CHANGE
* @param event packet
* @return status
* @note: btstack_type 1
*/
static inline uint8_t hci_event_mode_change_event_get_status(const uint8_t * event){
static inline uint8_t hci_event_mode_change_get_status(const uint8_t * event){
return event[2];
}
/**
* @brief Get field handle from event HCI_EVENT_MODE_CHANGE_EVENT
* @brief Get field handle from event HCI_EVENT_MODE_CHANGE
* @param event packet
* @return handle
* @note: btstack_type H
*/
static inline hci_con_handle_t hci_event_mode_change_event_get_handle(const uint8_t * event){
static inline hci_con_handle_t hci_event_mode_change_get_handle(const uint8_t * event){
return little_endian_read_16(event, 3);
}
/**
* @brief Get field mode from event HCI_EVENT_MODE_CHANGE_EVENT
* @brief Get field mode from event HCI_EVENT_MODE_CHANGE
* @param event packet
* @return mode
* @note: btstack_type 1
*/
static inline uint8_t hci_event_mode_change_event_get_mode(const uint8_t * event){
static inline uint8_t hci_event_mode_change_get_mode(const uint8_t * event){
return event[5];
}
/**
* @brief Get field interval from event HCI_EVENT_MODE_CHANGE_EVENT
* @brief Get field interval from event HCI_EVENT_MODE_CHANGE
* @param event packet
* @return interval
* @note: btstack_type 2
*/
static inline uint16_t hci_event_mode_change_event_get_interval(const uint8_t * event){
static inline uint16_t hci_event_mode_change_get_interval(const uint8_t * event){
return little_endian_read_16(event, 6);
}