mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-17 20:42:47 +00:00
bluetooth.h: move HCI events to btstack_defines.h
This commit is contained in:
parent
2865193aff
commit
ff3ef26837
371
src/bluetooth.h
371
src/bluetooth.h
@ -432,378 +432,7 @@ typedef enum {
|
|||||||
#define OGF_VENDOR 0x3f
|
#define OGF_VENDOR 0x3f
|
||||||
|
|
||||||
|
|
||||||
// Events from host controller to host
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1
|
|
||||||
* @param status
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_INQUIRY_COMPLETE 0x01
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1B11132
|
|
||||||
* @param num_responses
|
|
||||||
* @param bd_addr
|
|
||||||
* @param page_scan_repetition_mode
|
|
||||||
* @param reserved1
|
|
||||||
* @param reserved2
|
|
||||||
* @param class_of_device
|
|
||||||
* @param clock_offset
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_INQUIRY_RESULT 0x02
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 12B11
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
* @param bd_addr
|
|
||||||
* @param link_type
|
|
||||||
* @param encryption_enabled
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_CONNECTION_COMPLETE 0x03
|
|
||||||
/**
|
|
||||||
* @format B31
|
|
||||||
* @param bd_addr
|
|
||||||
* @param class_of_device
|
|
||||||
* @param link_type
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_CONNECTION_REQUEST 0x04
|
|
||||||
/**
|
|
||||||
* @format 121
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
* @param reason
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_DISCONNECTION_COMPLETE 0x05
|
|
||||||
/**
|
|
||||||
* @format 12
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
*/
|
|
||||||
#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
|
|
||||||
* @param bd_addr
|
|
||||||
* @param remote_name
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 0x07
|
|
||||||
/**
|
|
||||||
* @format 121
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
* @param encryption_enabled
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_ENCRYPTION_CHANGE 0x08
|
|
||||||
/**
|
|
||||||
* @format 12
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 0x09
|
|
||||||
/**
|
|
||||||
* @format 121
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
* @param key_flag
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_MASTER_LINK_KEY_COMPLETE 0x0A
|
|
||||||
|
|
||||||
#define HCI_EVENT_READ_REMOTE_SUPPORTED_FEATURES_COMPLETE 0x0B
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 12122
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
* @param version
|
|
||||||
* @param manufacturer_name
|
|
||||||
* @param subversion
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 0x0C
|
|
||||||
|
|
||||||
#define HCI_EVENT_QOS_SETUP_COMPLETE 0x0D
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 12R
|
|
||||||
* @param num_hci_command_packets
|
|
||||||
* @param command_opcode
|
|
||||||
* @param return_parameters
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_COMMAND_COMPLETE 0x0E
|
|
||||||
/**
|
|
||||||
* @format 112
|
|
||||||
* @param status
|
|
||||||
* @param num_hci_command_packets
|
|
||||||
* @param command_opcode
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_COMMAND_STATUS 0x0F
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1
|
|
||||||
* @param hardware_code
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_HARDWARE_ERROR 0x10
|
|
||||||
|
|
||||||
#define HCI_EVENT_FLUSH_OCCURRED 0x11
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1B1
|
|
||||||
* @param status
|
|
||||||
* @param bd_addr
|
|
||||||
* @param role
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_ROLE_CHANGE 0x12
|
|
||||||
|
|
||||||
// TODO: number_of_handles 1, connection_handle[H*i], hc_num_of_completed_packets[2*i]
|
|
||||||
#define HCI_EVENT_NUMBER_OF_COMPLETED_PACKETS 0x13
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1H12
|
|
||||||
* @param status
|
|
||||||
* @param handle
|
|
||||||
* @param mode
|
|
||||||
* @param interval
|
|
||||||
*/
|
|
||||||
#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
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format B
|
|
||||||
* @param bd_addr
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_PIN_CODE_REQUEST 0x16
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format B
|
|
||||||
* @param bd_addr
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_LINK_KEY_REQUEST 0x17
|
|
||||||
|
|
||||||
// TODO: bd_addr B, link_key 16octets, key_type 1
|
|
||||||
#define HCI_EVENT_LINK_KEY_NOTIFICATION 0x18
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1
|
|
||||||
* @param link_type
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_DATA_BUFFER_OVERFLOW 0x1A
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format H1
|
|
||||||
* @param handle
|
|
||||||
* @param lmp_max_slots
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_MAX_SLOTS_CHANGED 0x1B
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1H2
|
|
||||||
* @param status
|
|
||||||
* @param handle
|
|
||||||
* @param clock_offset
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 0x1C
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1H2
|
|
||||||
* @param status
|
|
||||||
* @param handle
|
|
||||||
* @param packet_types
|
|
||||||
* @pnote packet_type is in plural to avoid clash with Java binding Packet.getPacketType()
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 0x1D
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1B11321
|
|
||||||
* @param num_responses
|
|
||||||
* @param bd_addr
|
|
||||||
* @param page_scan_repetition_mode
|
|
||||||
* @param reserved
|
|
||||||
* @param class_of_device
|
|
||||||
* @param clock_offset
|
|
||||||
* @param rssi
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 0x22
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1HB111221
|
|
||||||
* @param status
|
|
||||||
* @param handle
|
|
||||||
* @param bd_addr
|
|
||||||
* @param link_type
|
|
||||||
* @param transmission_interval
|
|
||||||
* @param retransmission_interval
|
|
||||||
* @param rx_packet_length
|
|
||||||
* @param tx_packet_length
|
|
||||||
* @param air_mode
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 0x2C
|
|
||||||
|
|
||||||
// TODO: serialize extended_inquiry_response and provide parser
|
|
||||||
/**
|
|
||||||
* @format 1B11321
|
|
||||||
* @param num_responses
|
|
||||||
* @param bd_addr
|
|
||||||
* @param page_scan_repetition_mode
|
|
||||||
* @param reserved
|
|
||||||
* @param class_of_device
|
|
||||||
* @param clock_offset
|
|
||||||
* @param rssi
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 0x2F
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1H
|
|
||||||
* @param status
|
|
||||||
* @param handle
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 0x30
|
|
||||||
|
|
||||||
#define HCI_EVENT_IO_CAPABILITY_REQUEST 0x31
|
|
||||||
#define HCI_EVENT_IO_CAPABILITY_RESPONSE 0x32
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format B4
|
|
||||||
* @param bd_addr
|
|
||||||
* @param numeric_value
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_USER_CONFIRMATION_REQUEST 0x33
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format B
|
|
||||||
* @param bd_addr
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_USER_PASSKEY_REQUEST 0x34
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format B
|
|
||||||
* @param bd_addr
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_REMOTE_OOB_DATA_REQUEST 0x35
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1B
|
|
||||||
* @param status
|
|
||||||
* @param bd_addr
|
|
||||||
*/
|
|
||||||
#define HCI_EVENT_SIMPLE_PAIRING_COMPLETE 0x36
|
|
||||||
|
|
||||||
#define HCI_EVENT_LE_META 0x3E
|
|
||||||
|
|
||||||
// last used HCI_EVENT in 2.1 is 0x3d
|
|
||||||
// last used HCI_EVENT in 4.1 is 0x57
|
|
||||||
|
|
||||||
#define HCI_EVENT_VENDOR_SPECIFIC 0xFF
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 11H11B2221
|
|
||||||
* @param subevent_code
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
* @param role
|
|
||||||
* @param peer_address_type
|
|
||||||
* @param peer_address
|
|
||||||
* @param conn_interval
|
|
||||||
* @param conn_latency
|
|
||||||
* @param supervision_timeout
|
|
||||||
* @param master_clock_accuracy
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_CONNECTION_COMPLETE 0x01
|
|
||||||
|
|
||||||
// array of advertisements, not handled by event accessor generator
|
|
||||||
#define HCI_SUBEVENT_LE_ADVERTISING_REPORT 0x02
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 11H222
|
|
||||||
* @param subevent_code
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
* @param conn_interval
|
|
||||||
* @param conn_latency
|
|
||||||
* @param supervision_timeout
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 0x03
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1HD2
|
|
||||||
* @param subevent_code
|
|
||||||
* @param connection_handle
|
|
||||||
* @param random_number
|
|
||||||
* @param encryption_diversifier
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 0x04
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1HD2
|
|
||||||
* @param subevent_code
|
|
||||||
* @param connection_handle
|
|
||||||
* @param random_number
|
|
||||||
* @param encryption_diversifier
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 0x05
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1H2222
|
|
||||||
* @param subevent_code
|
|
||||||
* @param connection_handle
|
|
||||||
* @param interval_min
|
|
||||||
* @param interval_max
|
|
||||||
* @param latency
|
|
||||||
* @param timeout
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 0x06
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 1H2222
|
|
||||||
* @param subevent_code
|
|
||||||
* @param connection_handle
|
|
||||||
* @param max_tx_octets
|
|
||||||
* @param max_tx_time
|
|
||||||
* @param max_rx_octets
|
|
||||||
* @param max_rx_time
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 0x07
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 11QQ
|
|
||||||
* @param subevent_code
|
|
||||||
* @param status
|
|
||||||
* @param dhkey_x x coordinate of P256 public key
|
|
||||||
* @param dhkey_y y coordinate of P256 public key
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 0x08
|
|
||||||
/**
|
|
||||||
* @format 11Q
|
|
||||||
* @param subevent_code
|
|
||||||
* @param status
|
|
||||||
* @param dhkey Diffie-Hellman key
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 0x09
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @format 11H11BBB2221
|
|
||||||
* @param subevent_code
|
|
||||||
* @param status
|
|
||||||
* @param connection_handle
|
|
||||||
* @param role
|
|
||||||
* @param peer_address_type
|
|
||||||
* @param perr_addresss
|
|
||||||
* @param local_resolvable_private_addres
|
|
||||||
* @param peer_resolvable_private_addres
|
|
||||||
* @param conn_interval
|
|
||||||
* @param conn_latency
|
|
||||||
* @param supervision_timeout
|
|
||||||
* @param master_clock_accuracy
|
|
||||||
*/
|
|
||||||
#define HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 0x0A
|
|
||||||
|
|
||||||
// array of advertisements, not handled by event accessor generator
|
|
||||||
#define HCI_SUBEVENT_LE_DIRECT_ADVERTISING_REPORT 0x0B
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* L2CAP Layer
|
* L2CAP Layer
|
||||||
|
@ -254,6 +254,380 @@ typedef uint8_t sm_key_t[16];
|
|||||||
|
|
||||||
// EVENTS
|
// EVENTS
|
||||||
|
|
||||||
|
// Events from host controller to host
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1
|
||||||
|
* @param status
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_INQUIRY_COMPLETE 0x01
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1B11132
|
||||||
|
* @param num_responses
|
||||||
|
* @param bd_addr
|
||||||
|
* @param page_scan_repetition_mode
|
||||||
|
* @param reserved1
|
||||||
|
* @param reserved2
|
||||||
|
* @param class_of_device
|
||||||
|
* @param clock_offset
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_INQUIRY_RESULT 0x02
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 12B11
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
* @param bd_addr
|
||||||
|
* @param link_type
|
||||||
|
* @param encryption_enabled
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_CONNECTION_COMPLETE 0x03
|
||||||
|
/**
|
||||||
|
* @format B31
|
||||||
|
* @param bd_addr
|
||||||
|
* @param class_of_device
|
||||||
|
* @param link_type
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_CONNECTION_REQUEST 0x04
|
||||||
|
/**
|
||||||
|
* @format 121
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
* @param reason
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_DISCONNECTION_COMPLETE 0x05
|
||||||
|
/**
|
||||||
|
* @format 12
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
*/
|
||||||
|
#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
|
||||||
|
* @param bd_addr
|
||||||
|
* @param remote_name
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 0x07
|
||||||
|
/**
|
||||||
|
* @format 121
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
* @param encryption_enabled
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_ENCRYPTION_CHANGE 0x08
|
||||||
|
/**
|
||||||
|
* @format 12
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 0x09
|
||||||
|
/**
|
||||||
|
* @format 121
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
* @param key_flag
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_MASTER_LINK_KEY_COMPLETE 0x0A
|
||||||
|
|
||||||
|
#define HCI_EVENT_READ_REMOTE_SUPPORTED_FEATURES_COMPLETE 0x0B
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 12122
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
* @param version
|
||||||
|
* @param manufacturer_name
|
||||||
|
* @param subversion
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 0x0C
|
||||||
|
|
||||||
|
#define HCI_EVENT_QOS_SETUP_COMPLETE 0x0D
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 12R
|
||||||
|
* @param num_hci_command_packets
|
||||||
|
* @param command_opcode
|
||||||
|
* @param return_parameters
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_COMMAND_COMPLETE 0x0E
|
||||||
|
/**
|
||||||
|
* @format 112
|
||||||
|
* @param status
|
||||||
|
* @param num_hci_command_packets
|
||||||
|
* @param command_opcode
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_COMMAND_STATUS 0x0F
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1
|
||||||
|
* @param hardware_code
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_HARDWARE_ERROR 0x10
|
||||||
|
|
||||||
|
#define HCI_EVENT_FLUSH_OCCURRED 0x11
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1B1
|
||||||
|
* @param status
|
||||||
|
* @param bd_addr
|
||||||
|
* @param role
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_ROLE_CHANGE 0x12
|
||||||
|
|
||||||
|
// TODO: number_of_handles 1, connection_handle[H*i], hc_num_of_completed_packets[2*i]
|
||||||
|
#define HCI_EVENT_NUMBER_OF_COMPLETED_PACKETS 0x13
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H12
|
||||||
|
* @param status
|
||||||
|
* @param handle
|
||||||
|
* @param mode
|
||||||
|
* @param interval
|
||||||
|
*/
|
||||||
|
#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
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format B
|
||||||
|
* @param bd_addr
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_PIN_CODE_REQUEST 0x16
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format B
|
||||||
|
* @param bd_addr
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_LINK_KEY_REQUEST 0x17
|
||||||
|
|
||||||
|
// TODO: bd_addr B, link_key 16octets, key_type 1
|
||||||
|
#define HCI_EVENT_LINK_KEY_NOTIFICATION 0x18
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1
|
||||||
|
* @param link_type
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_DATA_BUFFER_OVERFLOW 0x1A
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format H1
|
||||||
|
* @param handle
|
||||||
|
* @param lmp_max_slots
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_MAX_SLOTS_CHANGED 0x1B
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H2
|
||||||
|
* @param status
|
||||||
|
* @param handle
|
||||||
|
* @param clock_offset
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 0x1C
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H2
|
||||||
|
* @param status
|
||||||
|
* @param handle
|
||||||
|
* @param packet_types
|
||||||
|
* @pnote packet_type is in plural to avoid clash with Java binding Packet.getPacketType()
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED 0x1D
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1B11321
|
||||||
|
* @param num_responses
|
||||||
|
* @param bd_addr
|
||||||
|
* @param page_scan_repetition_mode
|
||||||
|
* @param reserved
|
||||||
|
* @param class_of_device
|
||||||
|
* @param clock_offset
|
||||||
|
* @param rssi
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 0x22
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1HB111221
|
||||||
|
* @param status
|
||||||
|
* @param handle
|
||||||
|
* @param bd_addr
|
||||||
|
* @param link_type
|
||||||
|
* @param transmission_interval
|
||||||
|
* @param retransmission_interval
|
||||||
|
* @param rx_packet_length
|
||||||
|
* @param tx_packet_length
|
||||||
|
* @param air_mode
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_SYNCHRONOUS_CONNECTION_COMPLETE 0x2C
|
||||||
|
|
||||||
|
// TODO: serialize extended_inquiry_response and provide parser
|
||||||
|
/**
|
||||||
|
* @format 1B11321
|
||||||
|
* @param num_responses
|
||||||
|
* @param bd_addr
|
||||||
|
* @param page_scan_repetition_mode
|
||||||
|
* @param reserved
|
||||||
|
* @param class_of_device
|
||||||
|
* @param clock_offset
|
||||||
|
* @param rssi
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 0x2F
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H
|
||||||
|
* @param status
|
||||||
|
* @param handle
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_ENCRYPTION_KEY_REFRESH_COMPLETE 0x30
|
||||||
|
|
||||||
|
#define HCI_EVENT_IO_CAPABILITY_REQUEST 0x31
|
||||||
|
#define HCI_EVENT_IO_CAPABILITY_RESPONSE 0x32
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format B4
|
||||||
|
* @param bd_addr
|
||||||
|
* @param numeric_value
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_USER_CONFIRMATION_REQUEST 0x33
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format B
|
||||||
|
* @param bd_addr
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_USER_PASSKEY_REQUEST 0x34
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format B
|
||||||
|
* @param bd_addr
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_REMOTE_OOB_DATA_REQUEST 0x35
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1B
|
||||||
|
* @param status
|
||||||
|
* @param bd_addr
|
||||||
|
*/
|
||||||
|
#define HCI_EVENT_SIMPLE_PAIRING_COMPLETE 0x36
|
||||||
|
|
||||||
|
#define HCI_EVENT_LE_META 0x3E
|
||||||
|
|
||||||
|
// last used HCI_EVENT in 2.1 is 0x3d
|
||||||
|
// last used HCI_EVENT in 4.1 is 0x57
|
||||||
|
|
||||||
|
#define HCI_EVENT_VENDOR_SPECIFIC 0xFF
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 11H11B2221
|
||||||
|
* @param subevent_code
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
* @param role
|
||||||
|
* @param peer_address_type
|
||||||
|
* @param peer_address
|
||||||
|
* @param conn_interval
|
||||||
|
* @param conn_latency
|
||||||
|
* @param supervision_timeout
|
||||||
|
* @param master_clock_accuracy
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_CONNECTION_COMPLETE 0x01
|
||||||
|
|
||||||
|
// array of advertisements, not handled by event accessor generator
|
||||||
|
#define HCI_SUBEVENT_LE_ADVERTISING_REPORT 0x02
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 11H222
|
||||||
|
* @param subevent_code
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
* @param conn_interval
|
||||||
|
* @param conn_latency
|
||||||
|
* @param supervision_timeout
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 0x03
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1HD2
|
||||||
|
* @param subevent_code
|
||||||
|
* @param connection_handle
|
||||||
|
* @param random_number
|
||||||
|
* @param encryption_diversifier
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 0x04
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1HD2
|
||||||
|
* @param subevent_code
|
||||||
|
* @param connection_handle
|
||||||
|
* @param random_number
|
||||||
|
* @param encryption_diversifier
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 0x05
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H2222
|
||||||
|
* @param subevent_code
|
||||||
|
* @param connection_handle
|
||||||
|
* @param interval_min
|
||||||
|
* @param interval_max
|
||||||
|
* @param latency
|
||||||
|
* @param timeout
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_REMOTE_CONNECTION_PARAMETER_REQUEST 0x06
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 1H2222
|
||||||
|
* @param subevent_code
|
||||||
|
* @param connection_handle
|
||||||
|
* @param max_tx_octets
|
||||||
|
* @param max_tx_time
|
||||||
|
* @param max_rx_octets
|
||||||
|
* @param max_rx_time
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_DATA_LENGTH_CHANGE 0x07
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 11QQ
|
||||||
|
* @param subevent_code
|
||||||
|
* @param status
|
||||||
|
* @param dhkey_x x coordinate of P256 public key
|
||||||
|
* @param dhkey_y y coordinate of P256 public key
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE 0x08
|
||||||
|
/**
|
||||||
|
* @format 11Q
|
||||||
|
* @param subevent_code
|
||||||
|
* @param status
|
||||||
|
* @param dhkey Diffie-Hellman key
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_GENERATE_DHKEY_COMPLETE 0x09
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format 11H11BBB2221
|
||||||
|
* @param subevent_code
|
||||||
|
* @param status
|
||||||
|
* @param connection_handle
|
||||||
|
* @param role
|
||||||
|
* @param peer_address_type
|
||||||
|
* @param perr_addresss
|
||||||
|
* @param local_resolvable_private_addres
|
||||||
|
* @param peer_resolvable_private_addres
|
||||||
|
* @param conn_interval
|
||||||
|
* @param conn_latency
|
||||||
|
* @param supervision_timeout
|
||||||
|
* @param master_clock_accuracy
|
||||||
|
*/
|
||||||
|
#define HCI_SUBEVENT_LE_ENHANCED_CONNECTION_COMPLETE 0x0A
|
||||||
|
|
||||||
|
// array of advertisements, not handled by event accessor generator
|
||||||
|
#define HCI_SUBEVENT_LE_DIRECT_ADVERTISING_REPORT 0x0B
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @format 1
|
* @format 1
|
||||||
* @param state
|
* @param state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user