CDCSetLineCoding Macro

Microchip USB Device Library

USB Device Library Help
CDCSetLineCoding Macro
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

Microchip MCHPFSUSB v2.3 - Sept 20, 2008
Copyright © 2008 Microchip Technology, Inc.  All rights reserved.