Merge pull request #115 from roma-jam/bugfix/tinyusb_cdcacm_write_flush_return
tinyUSB: add logic description and ESP_OK return option. Closes: https://github.com/espressif/esp-idf/issues/10003
This commit is contained in:
commit
f4bd917dc0
|
@ -1,11 +1,11 @@
|
|||
description: Espressif's additions to TinyUSB
|
||||
documentation: "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_device.html"
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
url: https://github.com/espressif/idf-extra-components/tree/master/usb/esp_tinyusb
|
||||
dependencies:
|
||||
idf: '>=5.0' # IDF 4.x contains TinyUSB as submodule
|
||||
tinyusb:
|
||||
version: '~0.12.2' # Use fixed minor version. TinyUSB does not guarantee backward compatibility
|
||||
version: '^0.12.2' # Use fixed minor version. TinyUSB does not guarantee backward compatibility
|
||||
public: true
|
||||
targets:
|
||||
- esp32s2
|
||||
|
|
|
@ -307,9 +307,10 @@ esp_err_t tinyusb_cdcacm_write_flush(tinyusb_cdcacm_itf_t itf, uint32_t timeout_
|
|||
if (tud_cdc_n_write_occupied(itf)) {
|
||||
ESP_LOGW(TAG, "remained data to flush!");
|
||||
return ESP_FAIL;
|
||||
} else {
|
||||
return ESP_OK;
|
||||
}
|
||||
}
|
||||
return ESP_ERR_TIMEOUT;
|
||||
} else { // trying during the timeout
|
||||
uint32_t ticks_start = xTaskGetTickCount();
|
||||
uint32_t ticks_now = ticks_start;
|
||||
|
|
Loading…
Reference in New Issue