Bluetooth: Controller: Remove HCI event definitions from hci.c

Delete all event definitions from hci.c since the code now
uses the ones in include/bluetooth/hci.h exclusively.
This is the fourth and last commit in a series that transitions
from the event structures in hci.c to the ones in hci.h.

Jira: ZEP-726

Change-Id: I625c2aecf759823a1cc73a3ea096564284fe8c52
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2016-09-12 19:00:57 +02:00 committed by Johan Hedberg
commit 92b4458690

View file

@ -45,168 +45,6 @@ enum {
HCI_EVT = 0x04,
};
/*****************************************************************************
* HCI EVENTS
*****************************************************************************/
enum {
HCI_EVT_CODE_DISCONNECTION_COMPLETE = 0x05,
HCI_EVT_CODE_ENCRYPTION_CHANGE = 0x08,
HCI_EVT_CODE_READ_REMOTE_VERSION_INFO_COMPLETE = 0x0C,
HCI_EVT_CODE_COMMAND_COMPLETE = 0x0E,
HCI_EVT_CODE_COMMAND_STATUS = 0x0F,
HCI_EVT_CODE_NUM_COMPLETE = 0x13,
HCI_EVT_CODE_ENCRYPTION_KEY_REFRESH_COMPLETE = 0x30,
HCI_EVT_CODE_LE_META = 0x3E,
HCI_EVT_CODE_APTO_EXPIRED = 0x57,
};
enum {
HCI_EVT_ERROR_CODE_SUCCESS = 0x00,
HCI_EVT_ERROR_CODE_UNKNOWN_HCI_COMMAND = 0x01,
HCI_EVT_ERROR_CODE_PIN_OR_KEY_MISSING = 0x06,
HCI_EVT_ERROR_CODE_MEM_CAPACITY_EXCEEDED = 0x07,
HCI_EVT_ERROR_CODE_COMMAND_DISALLOWED = 0x0C,
};
struct __packed hci_evt_cmd_cmplt_unknown_hci_command {
uint8_t status;
};
struct __packed hci_evt_disconnect_cmplt {
uint8_t status;
uint16_t conn_handle;
uint8_t reason;
};
struct __packed hci_evt_encryption_change {
uint8_t status;
uint16_t conn_handle;
uint8_t enabled;
};
struct __packed hci_evt_read_remote_version_info_cmplt {
uint8_t status;
uint16_t conn_handle;
uint8_t version_number;
uint16_t company_id;
uint16_t sub_version_number;
};
struct __packed hci_evt_num_cmplt {
uint8_t num_handles;
uint8_t handles_nums[1];
};
struct __packed hci_evt_encryption_key_refresh_cmplt {
uint8_t status;
uint16_t conn_handle;
};
enum {
HCI_EVT_LE_META_CONNECTION_COMPLETE = 0x01,
HCI_EVT_LE_META_ADV_REPORT,
HCI_EVT_LE_META_CONNECTION_UPDATE_COMPLETE,
HCI_EVT_LE_META_READ_REMOTE_USED_FEATURE_COMPLETE,
HCI_EVT_LE_META_LONG_TERM_KEY_REQUEST,
HCI_EVT_LE_META_REMOTE_CONNECTION_PARAMETER_REQUEST,
HCI_EVT_LE_META_LENGTH_CHANGE,
};
struct __packed hci_evt_le_meta_conn_complete {
uint8_t status;
uint16_t conn_handle;
uint8_t role;
uint8_t addr_type;
uint8_t addr[BDADDR_SIZE];
uint16_t interval;
uint16_t latency;
uint16_t timeout;
uint8_t mca;
};
struct __packed hci_evt_le_meta_adv_report {
uint8_t num_reports;
uint8_t reports[1];
};
struct __packed hci_evt_le_meta_conn_update_complete {
uint8_t status;
uint16_t conn_handle;
uint16_t interval;
uint16_t latency;
uint16_t timeout;
};
struct __packed hci_evt_le_meta_read_remote_used_features {
uint8_t status;
uint16_t conn_handle;
uint8_t features[8];
};
struct __packed hci_evt_le_meta_long_term_key_request {
uint16_t conn_handle;
uint8_t rand[8];
uint8_t ediv[2];
};
struct __packed hci_evt_le_meta_remote_conn_param_request {
uint16_t conn_handle;
uint16_t interval_min;
uint16_t interval_max;
uint16_t latency;
uint16_t timeout;
};
struct __packed hci_evt_le_meta_length_change {
uint16_t conn_handle;
uint16_t max_tx_octets;
uint16_t max_tx_time;
uint16_t max_rx_octets;
uint16_t max_rx_time;
};
struct __packed hci_evt_le_meta {
uint8_t subevent_code;
union __packed {
struct hci_evt_le_meta_conn_complete conn_cmplt;
struct hci_evt_le_meta_adv_report adv_report;
struct hci_evt_le_meta_conn_update_complete conn_update_cmplt;
struct hci_evt_le_meta_read_remote_used_features
remote_used_features;
struct hci_evt_le_meta_long_term_key_request
long_term_key_request;
struct hci_evt_le_meta_remote_conn_param_request
remote_conn_param_request;
struct hci_evt_le_meta_length_change length_change;
} subevent;
};
struct __packed hci_evt_apto_expired {
uint16_t conn_handle;
};
struct __packed hci_evt {
uint8_t code;
uint8_t len;
union __packed {
struct hci_evt_disconnect_cmplt disconnect_cmplt;
struct hci_evt_encryption_change encryption_change;
struct hci_evt_read_remote_version_info_cmplt
read_remote_version_info_cmplt;
struct hci_evt_num_cmplt num_cmplt;
struct hci_evt_encryption_key_refresh_cmplt
encryption_key_refresh_cmplt;
struct hci_evt_le_meta le_meta;
struct hci_evt_apto_expired apto_expired;
} params;
};
struct __packed hci_data {
uint16_t handle:12;
uint16_t pb:2;