SO USING OF THE FLUSH WITH TIMEOUTS IN CALLBACKS IS NOT RECOMENDED - YOU CAN GET A LOCK FOR THE TIMEOUTĮsp_err_t - ESP_OK if (timeout_ticks > 0) and and flush was successful, ESP_ERR_TIMEOUT if timeout occurred3 or flush was successful with (timeout_ticks = 0) ESP_FAIL if flush was unsuccessful Parameters That can leads to the situation when you requested a flush, but it will fail until WARNING! TinyUSB can block output Endpoint for several RX callbacks, after will do additional flushĪfter the each trasfer. Use tinyusb_cdcacm_write_queue to add data to the buffer. Write data to write buffer from a byte array.Įsp_err_t tinyusb_cdcacm_write_flush ( tinyusb_cdcacm_itf_t itf, uint32_t timeout_ticks ) ¶ Size_t tinyusb_cdcacm_write_queue ( tinyusb_cdcacm_itf_t itf, const uint8_t * in_buf, size_t in_size ) ¶ Size_t - amount of queued bytes Parameters Size_t tinyusb_cdcacm_write_queue_char ( tinyusb_cdcacm_itf_t itf, char ch ) ¶ Unregister a callback invoking on CDC event.
If the callback had been already registered, it will be overwritten.Įsp_err_t - ESP_OK or ESP_ERR_INVALID_ARG ParametersĮvent_type: - type of registered event for a callbackĮsp_err_t tinyusb_cdcacm_unregister_callback ( tinyusb_cdcacm_itf_t itf, cdcacm_event_type_t event_type ) ¶ Register a callback invoking on CDC event. Initialization will be finished with the tud_cdc_line_state_cb callback.Įsp_err_t tinyusb_cdcacm_register_callback ( tinyusb_cdcacm_itf_t itf, cdcacm_event_type_t event_type, tusb_cdcacm_callback_t callback ) ¶ Functions ¶ esp_err_t tusb_cdc_acm_init ( const tinyusb_config_cdcacm_t * cfg ) ¶