mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
tinyusb: reduce annoying log under verbose level in CDC
And a robust fix.
This commit is contained in:
@@ -248,11 +248,9 @@ static esp_err_t ringbuf_mux_take(esp_tusb_cdcacm_t *acm){
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static esp_err_t ringbuf_mux_give(esp_tusb_cdcacm_t *acm){
|
static esp_err_t ringbuf_mux_give(esp_tusb_cdcacm_t *acm) {
|
||||||
if(xSemaphoreGive(acm->ringbuf_read_mux) != pdTRUE){
|
BaseType_t ret = xSemaphoreGive(acm->ringbuf_read_mux);
|
||||||
ESP_LOGW(TAG, "Can't return the ringbuff mutex: mutex hasn't been taken");
|
assert(ret == pdTRUE);
|
||||||
return ESP_ERR_INVALID_STATE;
|
|
||||||
}
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,7 +275,6 @@ esp_err_t tinyusb_cdcacm_read(tinyusb_cdcacm_itf_t itf, uint8_t *out_buf, size_t
|
|||||||
*rx_data_size = read_sz;
|
*rx_data_size = read_sz;
|
||||||
/* Buffer's data can be wrapped, at that situations we should make another retrievement */
|
/* Buffer's data can be wrapped, at that situations we should make another retrievement */
|
||||||
if (read_from_rx_unread_to_buffer(acm, out_buf+read_sz, out_buf_sz-read_sz, &read_sz) == ESP_OK) {
|
if (read_from_rx_unread_to_buffer(acm, out_buf+read_sz, out_buf_sz-read_sz, &read_sz) == ESP_OK) {
|
||||||
ESP_LOGV(TAG, "Buffer was wrapped, data obtained using two read operations.");
|
|
||||||
*rx_data_size += read_sz;
|
*rx_data_size += read_sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user