mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/esp32c2_acl_flow_ctrl_err' into 'master'
Bugfix/esp32c2 acl flow ctrl err See merge request espressif/esp-idf!22689
This commit is contained in:
commit
b43cde7463
@ -320,7 +320,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
|
||||
if (*(data) == DATA_TYPE_ACL) {
|
||||
struct os_mbuf *om = os_msys_get_pkthdr(len, ACL_DATA_MBUF_LEADINGSPCAE);
|
||||
assert(om);
|
||||
os_mbuf_append(om, &data[1], len - 1);
|
||||
assert(os_mbuf_append(om, &data[1], len - 1) == 0);
|
||||
ble_hci_trans_hs_acl_tx(om);
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
|
||||
if (*(data) == DATA_TYPE_ACL) {
|
||||
struct os_mbuf *om = os_msys_get_pkthdr(len, ACL_DATA_MBUF_LEADINGSPCAE);
|
||||
assert(om);
|
||||
os_mbuf_append(om, &data[1], len - 1);
|
||||
assert(os_mbuf_append(om, &data[1], len - 1) == 0);
|
||||
ble_hci_trans_hs_acl_tx(om);
|
||||
}
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
|
||||
if (*(data) == DATA_TYPE_ACL) {
|
||||
struct os_mbuf *om = os_msys_get_pkthdr(len, ACL_DATA_MBUF_LEADINGSPCAE);
|
||||
assert(om);
|
||||
os_mbuf_append(om, &data[1], len - 1);
|
||||
assert(os_mbuf_append(om, &data[1], len - 1) == 0);
|
||||
ble_hci_trans_hs_acl_tx(om);
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
|
||||
if (*(data) == DATA_TYPE_ACL) {
|
||||
struct os_mbuf *om = os_msys_get_pkthdr(len, ACL_DATA_MBUF_LEADINGSPCAE);
|
||||
assert(om);
|
||||
os_mbuf_append(om, &data[1], len - 1);
|
||||
assert(os_mbuf_append(om, &data[1], len - 1) == 0);
|
||||
ble_hci_trans_hs_acl_tx(om);
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,16 @@ void hci_uart_start_tx(int port_num);
|
||||
*/
|
||||
void hci_uart_start_rx(int port_num);
|
||||
|
||||
/**
|
||||
* @brief reconfig hci uart pin
|
||||
*
|
||||
* @param tx_pin The Tx pin
|
||||
* @param rx_pin The Rx pin
|
||||
* @param cts_pin The CTS pin
|
||||
* @param rts_pin The RTS pin
|
||||
* @return int 0 on success, non-zero error code on failure
|
||||
*/
|
||||
int hci_uart_reconfig_pin(int tx_pin, int rx_pin, int cts_pin, int rts_pin);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -191,4 +191,17 @@ int hci_uart_close(int port_num)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hci_uart_reconfig_pin(int tx_pin, int rx_pin, int cts_pin, int rts_pin)
|
||||
{
|
||||
int port_num = hci_uart.port;
|
||||
int32_t baud_rate = hci_uart.cfg.baud_rate;
|
||||
uint8_t data_bits = hci_uart.cfg.data_bits;
|
||||
uint8_t stop_bits = hci_uart.cfg.stop_bits;
|
||||
uart_parity_t parity = hci_uart.cfg.parity;
|
||||
uart_hw_flowcontrol_t flow_ctl = hci_uart.cfg.flow_ctrl;
|
||||
hci_uart_close(port_num);
|
||||
hci_uart_config(port_num, baud_rate, data_bits, stop_bits, parity, flow_ctl);
|
||||
ESP_ERROR_CHECK(uart_set_pin(port_num, tx_pin, rx_pin, rts_pin, cts_pin));
|
||||
return 0;
|
||||
}
|
||||
#endif //CONFIG_BT_LE_HCI_INTERFACE_USE_UART
|
||||
|
@ -823,7 +823,6 @@ r_ble_ll_get_tx_pwr_compensation = 0x40000f88;
|
||||
r_ble_ll_hci_acl_rx = 0x40000f8c;
|
||||
r_ble_ll_hci_adv_mode_ext = 0x40000f90;
|
||||
r_ble_ll_hci_adv_set_enable = 0x40000f94;
|
||||
r_ble_ll_hci_cb_host_buf_size = 0x40000f98;
|
||||
r_ble_ll_hci_cb_set_ctrlr_to_host_fc = 0x40000f9c;
|
||||
r_ble_ll_hci_cb_set_event_mask = 0x40000fa0;
|
||||
r_ble_ll_hci_cb_set_event_mask2 = 0x40000fa4;
|
||||
|
Loading…
x
Reference in New Issue
Block a user