summaryrefslogtreecommitdiff
path: root/src/class/cdc/cdc_host.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-04-28 19:06:08 +0700
committerhathach <[email protected]>2023-04-28 19:13:25 +0700
commit0a43a7b418dc9ba510505eef6abbc2da6f9151e5 (patch)
tree450744100cff534a60c722698709c14f4a9d55b7 /src/class/cdc/cdc_host.h
parent2afef458be5ddea97d286f5dd8d3925c4846ee6e (diff)
improve host serial drivers
- tuh_control_xfer() update xfer result to user_data if complete callback = NULL (sync/blocking) - refactor host serial driver for acm/ftdi/cp210x
Diffstat (limited to 'src/class/cdc/cdc_host.h')
-rw-r--r--src/class/cdc/cdc_host.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/class/cdc/cdc_host.h b/src/class/cdc/cdc_host.h
index 971ebe2ae..f6cc3812f 100644
--- a/src/class/cdc/cdc_host.h
+++ b/src/class/cdc/cdc_host.h
@@ -134,7 +134,11 @@ bool tuh_cdc_read_clear (uint8_t idx);
//--------------------------------------------------------------------+
// Control Endpoint (Request) API
-// Each Function will make a USB transfer request to/from device
+// Each Function will make a USB control transfer request to/from device
+// - If complete_cb is provided, the function will return immediately and invoke
+// the callback when request is complete.
+// - If complete_cb is NULL, the function will block until request is complete.
+// In this case, user_data should be pointed to xfer_result_t to hold the transfer result.
//--------------------------------------------------------------------+
// Request to Set Control Line State: DTR (bit 0), RTS (bit 1)