mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-10 11:10:03 +00:00
nimble/ll: Use 'vs' for vendor specific HCI consistently
This commit is contained in:
@@ -48,7 +48,7 @@ extern "C" {
|
||||
if (hal_debugger_connected()) { \
|
||||
assert(0);\
|
||||
} else {\
|
||||
ble_ll_hci_ev_send_vendor_err(__FILE__, __LINE__); \
|
||||
ble_ll_hci_ev_send_vs_assert(__FILE__, __LINE__); \
|
||||
while(1) {}\
|
||||
}\
|
||||
}
|
||||
|
||||
@@ -315,9 +315,9 @@ int ble_ll_hci_ev_phy_update(struct ble_ll_conn_sm *connsm, uint8_t status);
|
||||
void ble_ll_calc_session_key(struct ble_ll_conn_sm *connsm);
|
||||
void ble_ll_ctrl_phy_update_proc_complete(struct ble_ll_conn_sm *connsm);
|
||||
void ble_ll_ctrl_initiate_dle(struct ble_ll_conn_sm *connsm);
|
||||
void ble_ll_hci_ev_send_vendor_err(const char *file, uint32_t line);
|
||||
void ble_ll_hci_ev_send_llcp_trace(uint8_t type, uint16_t handle, uint16_t count,
|
||||
void *pdu, size_t length);
|
||||
void ble_ll_hci_ev_send_vs_assert(const char *file, uint32_t line);
|
||||
void ble_ll_hci_ev_send_vs_llcp_trace(uint8_t type, uint16_t handle, uint16_t count,
|
||||
void *pdu, size_t length);
|
||||
|
||||
uint8_t ble_ll_ctrl_phy_tx_transition_get(uint8_t phy_mask);
|
||||
uint8_t ble_ll_ctrl_phy_from_phy_mask(uint8_t phy_mask);
|
||||
|
||||
@@ -2469,8 +2469,9 @@ ble_ll_ctrl_rx_pdu(struct ble_ll_conn_sm *connsm, struct os_mbuf *om)
|
||||
opcode = dptr[2];
|
||||
|
||||
#if MYNEWT_VAL(BLE_LL_HCI_LLCP_TRACE)
|
||||
ble_ll_hci_ev_send_llcp_trace(0x03, connsm->conn_handle, connsm->event_cntr,
|
||||
&dptr[2], len);
|
||||
ble_ll_hci_ev_send_vs_llcp_trace(0x03, connsm->conn_handle,
|
||||
connsm->event_cntr,
|
||||
&dptr[2], len);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -2803,8 +2804,9 @@ ble_ll_ctrl_tx_done(struct os_mbuf *txpdu, struct ble_ll_conn_sm *connsm)
|
||||
uint8_t opcode;
|
||||
|
||||
#if MYNEWT_VAL(BLE_LL_HCI_LLCP_TRACE)
|
||||
ble_ll_hci_ev_send_llcp_trace(0x04, connsm->conn_handle, connsm->event_cntr,
|
||||
txpdu->om_data, txpdu->om_len);
|
||||
ble_ll_hci_ev_send_vs_llcp_trace(0x04, connsm->conn_handle,
|
||||
connsm->event_cntr,
|
||||
txpdu->om_data, txpdu->om_len);
|
||||
#endif
|
||||
|
||||
rc = 0;
|
||||
|
||||
@@ -493,9 +493,9 @@ ble_ll_hci_ev_sca_update(struct ble_ll_conn_sm *connsm, uint8_t status,
|
||||
#endif
|
||||
|
||||
void
|
||||
ble_ll_hci_ev_send_vendor_err(const char *file, uint32_t line)
|
||||
ble_ll_hci_ev_send_vs_assert(const char *file, uint32_t line)
|
||||
{
|
||||
struct ble_hci_ev_vendor_debug *ev;
|
||||
struct ble_hci_ev_vs_debug *ev;
|
||||
struct ble_hci_ev *hci_ev;
|
||||
unsigned int str_len;
|
||||
bool skip = true;
|
||||
@@ -510,7 +510,7 @@ ble_ll_hci_ev_send_vendor_err(const char *file, uint32_t line)
|
||||
|
||||
hci_ev = (void *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_EVT_HI);
|
||||
if (hci_ev) {
|
||||
hci_ev->opcode = BLE_HCI_EVCODE_VENDOR_DEBUG;
|
||||
hci_ev->opcode = BLE_HCI_EVCODE_VS_DEBUG;
|
||||
hci_ev->length = sizeof(*ev);
|
||||
ev = (void *) hci_ev->data;
|
||||
|
||||
@@ -554,15 +554,15 @@ ble_ll_hci_ev_send_vendor_err(const char *file, uint32_t line)
|
||||
|
||||
#if MYNEWT_VAL(BLE_LL_HCI_LLCP_TRACE)
|
||||
void
|
||||
ble_ll_hci_ev_send_llcp_trace(uint8_t type, uint16_t handle, uint16_t count,
|
||||
void *pdu, size_t length)
|
||||
ble_ll_hci_ev_send_vs_llcp_trace(uint8_t type, uint16_t handle, uint16_t count,
|
||||
void *pdu, size_t length)
|
||||
{
|
||||
struct ble_hci_ev_vendor_debug *ev;
|
||||
struct ble_hci_ev_vs_debug *ev;
|
||||
struct ble_hci_ev *hci_ev;
|
||||
|
||||
hci_ev = (void *)ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_EVT_LO);
|
||||
if (hci_ev) {
|
||||
hci_ev->opcode = BLE_HCI_EVCODE_VENDOR_DEBUG;
|
||||
hci_ev->opcode = BLE_HCI_EVCODE_VS_DEBUG;
|
||||
hci_ev->length = sizeof(*ev) + 8 + length;
|
||||
ev = (void *) hci_ev->data;
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ syscfg.defs:
|
||||
depending on specified HCI command length.
|
||||
value: 0
|
||||
|
||||
BLE_LL_VND_EVENT_ON_ASSERT:
|
||||
BLE_LL_HCI_VS_EVENT_ON_ASSERT:
|
||||
description: >
|
||||
This options enables controller to send a vendor-specific event on
|
||||
an assertion in controller code. The event contains file name and
|
||||
@@ -438,6 +438,10 @@ syscfg.defs:
|
||||
description: use BLE_LL_SCA instead
|
||||
value: 60
|
||||
deprecated: 1
|
||||
BLE_LL_VND_EVENT_ON_ASSERT:
|
||||
description: use BLE_LL_HCI_VS_EVENT_ON_ASSERT
|
||||
value: 0
|
||||
deprecated: 1
|
||||
|
||||
# defunct settings (to be removed eventually)
|
||||
BLE_DEVICE:
|
||||
@@ -466,7 +470,7 @@ syscfg.vals.BLE_LL_CFG_FEAT_LL_EXT_ADV:
|
||||
# Enable vendor event on assert in standalone build to make failed assertions in
|
||||
# controller code visible when connected to external host
|
||||
syscfg.vals.!BLE_HOST:
|
||||
BLE_LL_VND_EVENT_ON_ASSERT: 1
|
||||
BLE_LL_HCI_VS_EVENT_ON_ASSERT: 1
|
||||
|
||||
syscfg.restrictions:
|
||||
- OS_CPUTIME_FREQ == 32768
|
||||
|
||||
@@ -1446,8 +1446,8 @@ struct ble_hci_ev_auth_pyld_tmo {
|
||||
|
||||
#define BLE_HCI_EVCODE_SAM_STATUS_CHG (0x58)
|
||||
|
||||
#define BLE_HCI_EVCODE_VENDOR_DEBUG (0xFF)
|
||||
struct ble_hci_ev_vendor_debug {
|
||||
#define BLE_HCI_EVCODE_VS_DEBUG (0xFF)
|
||||
struct ble_hci_ev_vs_debug {
|
||||
uint8_t id;
|
||||
uint8_t data[0];
|
||||
} __attribute__((packed));
|
||||
|
||||
Reference in New Issue
Block a user