C
#define CDCSetLineCoding(baud,format,parity,dataSize) {\ CDCSetBaudRate(baud);\ CDCSetCharacterFormat(format);\ CDCSetParity(parity);\ CDCSetDataSize(dataSize);\ }
Description
This function is used to manually set the data reported back to the host during a get line coding request.
Typical Usage:
CDCSetLineCoding(19200, NUM_STOP_BITS_1, PARITY_NONE, 8);
This function is optional for CDC devices that do not actually convert the USB traffic to a hardware UART.
Preconditions
None
Parameters
Parameters |
Description |
DWORD baud |
The desired baudrate |
BYTE format |
number of stop bits. Available options are:
|
BYTE parity |
Type of parity. The options are the following:
|
BYTE dataSize |
number of data bits. The options are 5, 6, 7, 8, or 16. |
Remarks
None
MCHPFSUSB Device Library > Function Drivers > Communication Device Class (CDC) > Public API Members > Functions and Macros > CDCSetLineCoding Macro