4.1.3 GET_LINE_CODING Command and its Response

The GET_LINE_CODING command retrieves the current UART configuration.

Send this request through Endpoint 0x0, with the parameters described in the GET_LINE_CODING - Command table, to retrieve the current UART configuration. The configuration can be read from Endpoint 0x00 in the format given in the GET_LINE_CODING - Response table.

Table 4-4. GET_LINE_CODING - Command
Byte IndexCommandDescription
00xA1bmRequestTypeHost to device, class-specific, Interface 0
10x21bRequest Read the UART baud rate, stop bits, parity, and data width
20x00wValue – lower byteReserved
30x00wValue – higher byte
40x00wIndex – lower byteInterface 0
50x00wIndex – higher byte
60x07wLength – lower bytePayload length in bytes
70x00wLength – higher byte
Table 4-5. GET_LINE_CODING - Response
Byte IndexResponseDescription
0L(Baud)dwBaud – lowest byteThe baud rate in 32-bit hexadecimal format
1H1(Baud)dwBaud – higher byte
2H2(Baud)dwBaud – next higher byte
3H3(Baud)dwBaud – highest byte
4

0x00

0x01

0x02

1 Stop bit

1.5 Stop bit

2 Stop bits

Number of stop bits
5

0x00

0x01

0x02

No parity

Odd parity

Even parity

Data parity
6

0x05

0x06

0x07

0x08

5-bit data width

6-bit data width

7-bit data width

8-bit data width

Data byte width