mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ble: Assert when getting memory fail
This commit is contained in:
parent
91f531b14e
commit
3f6dd76e41
@ -311,6 +311,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
|
||||
if (*(data) == DATA_TYPE_COMMAND) {
|
||||
struct ble_hci_cmd *cmd = NULL;
|
||||
cmd = (struct ble_hci_cmd *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
|
||||
assert(cmd);
|
||||
memcpy((uint8_t *)cmd, data + 1, len - 1);
|
||||
ble_hci_trans_hs_cmd_tx((uint8_t *)cmd);
|
||||
}
|
||||
|
@ -317,6 +317,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
|
||||
if (*(data) == DATA_TYPE_COMMAND) {
|
||||
struct ble_hci_cmd *cmd = NULL;
|
||||
cmd = (struct ble_hci_cmd *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
|
||||
assert(cmd);
|
||||
memcpy((uint8_t *)cmd, data + 1, len - 1);
|
||||
ble_hci_trans_hs_cmd_tx((uint8_t *)cmd);
|
||||
}
|
||||
|
@ -313,6 +313,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
|
||||
if (*(data) == DATA_TYPE_COMMAND) {
|
||||
struct ble_hci_cmd *cmd = NULL;
|
||||
cmd = (struct ble_hci_cmd *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
|
||||
assert(cmd);
|
||||
memcpy((uint8_t *)cmd, data + 1, len - 1);
|
||||
ble_hci_trans_hs_cmd_tx((uint8_t *)cmd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user