Fixes HWCDC::end() (#8247)
* Fixes HWCDC::end() There is a missing `tx_lock = NULL;` * Update HWCDC.cpp Initialize rx_data_buf[] with zeros.
This commit is contained in:
parent
3ec5f4efa1
commit
083db166a1
1 changed files with 2 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ ESP_EVENT_DEFINE_BASE(ARDUINO_HW_CDC_EVENTS);
|
|||
|
||||
static RingbufHandle_t tx_ring_buf = NULL;
|
||||
static xQueueHandle rx_queue = NULL;
|
||||
static uint8_t rx_data_buf[64];
|
||||
static uint8_t rx_data_buf[64] = {0};
|
||||
static intr_handle_t intr_handle = NULL;
|
||||
static volatile bool initial_empty = false;
|
||||
static xSemaphoreHandle tx_lock = NULL;
|
||||
|
|
@ -195,6 +195,7 @@ void HWCDC::end()
|
|||
intr_handle = NULL;
|
||||
if(tx_lock != NULL) {
|
||||
vSemaphoreDelete(tx_lock);
|
||||
tx_lock = NULL;
|
||||
}
|
||||
setRxBufferSize(0);
|
||||
setTxBufferSize(0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue