cdc host, add set line coding API

This commit is contained in:
hathach
2022-12-22 18:28:06 +07:00
parent 11233e4d3e
commit 05c119ce97
4 changed files with 146 additions and 44 deletions

View File

@@ -109,8 +109,15 @@
#define CFG_TUH_HID_EPOUT_BUFSIZE 64
//------------- CDC -------------//
// Set both DTR ( bit 0), RTS (bit 1) on enumeration/mounted
#define CFG_TUH_CDC_SET_DTRRTS_ON_ENUM 0x03
// Set Line Control state on enumeration/mounted:
// DTR ( bit 0), RTS (bit 1)
#define CFG_TUH_CDC_LINE_CONTROL_ON_ENUM 0x03
// Set Line Coding on enumeration/mounted, value for cdc_line_coding_t
// bit rate = 115200, 1 stop bit, no parity, 8 bit data width
#define CFG_TUH_CDC_LINE_CODING_ON_ENUM { 115200, CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 }
#ifdef __cplusplus
}