Unverified Commit 083db166 authored by Rodrigo Garcia's avatar Rodrigo Garcia Committed by GitHub

Fixes HWCDC::end() (#8247)

* Fixes HWCDC::end()

There is a missing `tx_lock = NULL;`

* Update HWCDC.cpp

Initialize rx_data_buf[] with zeros.
parent 3ec5f4ef
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment