mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-31 09:36:10 +00:00
ble_monitor; crashes if outputting uart receives any characters.
Add a routine to discard the data instead.
This commit is contained in:
@@ -71,6 +71,12 @@ inc_and_wrap(int i, int max)
|
||||
return (i + 1) & (max - 1);
|
||||
}
|
||||
|
||||
static int
|
||||
monitor_uart_rx_discard(void *arg, uint8_t ch)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
monitor_uart_tx_char(void *arg)
|
||||
{
|
||||
@@ -295,7 +301,7 @@ ble_monitor_init(void)
|
||||
.uc_parity = UART_PARITY_NONE,
|
||||
.uc_flow_ctl = UART_FLOW_CTL_NONE,
|
||||
.uc_tx_char = monitor_uart_tx_char,
|
||||
.uc_rx_char = NULL,
|
||||
.uc_rx_char = monitor_uart_rx_discard,
|
||||
.uc_cb_arg = NULL,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user