btstack_defines: drop unused SM events

This commit is contained in:
Matthias Ringwald 2020-11-04 18:26:38 +01:00
parent a66b030f2e
commit 12a574e512
2 changed files with 27 additions and 141 deletions

View File

@ -1181,13 +1181,30 @@ typedef uint8_t sm_key_t[16];
*/
#define SM_EVENT_JUST_WORKS_REQUEST 0xD0
/**
* @format H1B4
* @param handle
* @param addr_type
* @param address
* @param passkey
*/
#define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD1
/**
* @format H1B
* @param handle
* @param addr_type
* @param address
*/
#define SM_EVENT_JUST_WORKS_CANCEL 0xD1
#define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD2
/**
* @format H1B
* @param handle
* @param addr_type
* @param address
*/
#define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD3
/**
* @format H1B4
@ -1196,7 +1213,7 @@ typedef uint8_t sm_key_t[16];
* @param address
* @param passkey
*/
#define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD2
#define SM_EVENT_NUMERIC_COMPARISON_REQUEST 0xD4
/**
* @format H1B
@ -1204,7 +1221,7 @@ typedef uint8_t sm_key_t[16];
* @param addr_type
* @param address
*/
#define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD3
#define SM_EVENT_IDENTITY_RESOLVING_STARTED 0xD5
/**
* @format H1B
@ -1212,48 +1229,7 @@ typedef uint8_t sm_key_t[16];
* @param addr_type
* @param address
*/
#define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD4
/**
* @format H1B
* @param handle
* @param addr_type
* @param address
*/
#define SM_EVENT_PASSKEY_INPUT_CANCEL 0xD5
/**
* @format H1B4
* @param handle
* @param addr_type
* @param address
* @param passkey
*/
#define SM_EVENT_NUMERIC_COMPARISON_REQUEST 0xD6
/**
* @format H1B
* @param handle
* @param addr_type
* @param address
*/
#define SM_EVENT_NUMERIC_COMPARISON_CANCEL 0xD7
/**
* @format H1B
* @param handle
* @param addr_type
* @param address
*/
#define SM_EVENT_IDENTITY_RESOLVING_STARTED 0xD8
/**
* @format H1B
* @param handle
* @param addr_type
* @param address
*/
#define SM_EVENT_IDENTITY_RESOLVING_FAILED 0xD9
#define SM_EVENT_IDENTITY_RESOLVING_FAILED 0xD6
/**
* @brief Identify resolving succeeded
@ -1267,7 +1243,7 @@ typedef uint8_t sm_key_t[16];
* @param index
*
*/
#define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xDA
#define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xD7
/**
* @format H1B
@ -1275,7 +1251,7 @@ typedef uint8_t sm_key_t[16];
* @param addr_type
* @param address
*/
#define SM_EVENT_AUTHORIZATION_REQUEST 0xDB
#define SM_EVENT_AUTHORIZATION_REQUEST 0xD8
/**
* @format H1B1
@ -1284,14 +1260,14 @@ typedef uint8_t sm_key_t[16];
* @param address
* @param authorization_result
*/
#define SM_EVENT_AUTHORIZATION_RESULT 0xDC
#define SM_EVENT_AUTHORIZATION_RESULT 0xD9
/**
* @format H1
* @param handle
* @param action see SM_KEYPRESS_*
*/
#define SM_EVENT_KEYPRESS_NOTIFICATION 0xDD
#define SM_EVENT_KEYPRESS_NOTIFICATION 0xDA
/**
* @brief Emitted during pairing to inform app about address used as identity
@ -1304,7 +1280,7 @@ typedef uint8_t sm_key_t[16];
* @param identity_address
* @param index
*/
#define SM_EVENT_IDENTITY_CREATED 0xDE
#define SM_EVENT_IDENTITY_CREATED 0xDB
/**
* @brief Emitted to inform app that pairing is complete. Possible status values:
@ -1320,7 +1296,7 @@ typedef uint8_t sm_key_t[16];
* @param status
* @param reason if status == ERROR_CODE_AUTHENTICATION_FAILURE
*/
#define SM_EVENT_PAIRING_COMPLETE 0xDF
#define SM_EVENT_PAIRING_COMPLETE 0xDC
// GAP

View File

@ -2572,36 +2572,6 @@ static inline void sm_event_just_works_request_get_address(const uint8_t * event
}
#endif
#ifdef ENABLE_BLE
/**
* @brief Get field handle from event SM_EVENT_JUST_WORKS_CANCEL
* @param event packet
* @return handle
* @note: btstack_type H
*/
static inline hci_con_handle_t sm_event_just_works_cancel_get_handle(const uint8_t * event){
return little_endian_read_16(event, 2);
}
/**
* @brief Get field addr_type from event SM_EVENT_JUST_WORKS_CANCEL
* @param event packet
* @return addr_type
* @note: btstack_type 1
*/
static inline uint8_t sm_event_just_works_cancel_get_addr_type(const uint8_t * event){
return event[4];
}
/**
* @brief Get field address from event SM_EVENT_JUST_WORKS_CANCEL
* @param event packet
* @param Pointer to storage for address
* @note: btstack_type B
*/
static inline void sm_event_just_works_cancel_get_address(const uint8_t * event, bd_addr_t address){
reverse_bytes(&event[5], address, 6);
}
#endif
#ifdef ENABLE_BLE
/**
* @brief Get field handle from event SM_EVENT_PASSKEY_DISPLAY_NUMBER
@ -2701,36 +2671,6 @@ static inline void sm_event_passkey_input_number_get_address(const uint8_t * eve
}
#endif
#ifdef ENABLE_BLE
/**
* @brief Get field handle from event SM_EVENT_PASSKEY_INPUT_CANCEL
* @param event packet
* @return handle
* @note: btstack_type H
*/
static inline hci_con_handle_t sm_event_passkey_input_cancel_get_handle(const uint8_t * event){
return little_endian_read_16(event, 2);
}
/**
* @brief Get field addr_type from event SM_EVENT_PASSKEY_INPUT_CANCEL
* @param event packet
* @return addr_type
* @note: btstack_type 1
*/
static inline uint8_t sm_event_passkey_input_cancel_get_addr_type(const uint8_t * event){
return event[4];
}
/**
* @brief Get field address from event SM_EVENT_PASSKEY_INPUT_CANCEL
* @param event packet
* @param Pointer to storage for address
* @note: btstack_type B
*/
static inline void sm_event_passkey_input_cancel_get_address(const uint8_t * event, bd_addr_t address){
reverse_bytes(&event[5], address, 6);
}
#endif
#ifdef ENABLE_BLE
/**
* @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_REQUEST
@ -2770,36 +2710,6 @@ static inline uint32_t sm_event_numeric_comparison_request_get_passkey(const uin
}
#endif
#ifdef ENABLE_BLE
/**
* @brief Get field handle from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
* @param event packet
* @return handle
* @note: btstack_type H
*/
static inline hci_con_handle_t sm_event_numeric_comparison_cancel_get_handle(const uint8_t * event){
return little_endian_read_16(event, 2);
}
/**
* @brief Get field addr_type from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
* @param event packet
* @return addr_type
* @note: btstack_type 1
*/
static inline uint8_t sm_event_numeric_comparison_cancel_get_addr_type(const uint8_t * event){
return event[4];
}
/**
* @brief Get field address from event SM_EVENT_NUMERIC_COMPARISON_CANCEL
* @param event packet
* @param Pointer to storage for address
* @note: btstack_type B
*/
static inline void sm_event_numeric_comparison_cancel_get_address(const uint8_t * event, bd_addr_t address){
reverse_bytes(&event[5], address, 6);
}
#endif
#ifdef ENABLE_BLE
/**
* @brief Get field handle from event SM_EVENT_IDENTITY_RESOLVING_STARTED