usb: cdc_acm: SerialState notification full support
Added bBreak, bRingSignal, bFraming, bParity and bOverRun handling in cdc_acm_line_ctrl_set. Reference: Chapter 6.5.4 of Universal Serial Bus Communications Class Subclass Specification for PSTN Devices rev 1.2 Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
This commit is contained in:
parent
3c82d233e3
commit
ea7afdde8f
2 changed files with 54 additions and 6 deletions
|
@ -72,11 +72,21 @@
|
|||
#define SET_CONTROL_LINE_STATE_RTS 0x02
|
||||
#define SET_CONTROL_LINE_STATE_DTR 0x01
|
||||
|
||||
/** Enhance enum uart_line_ctrl with CDC specific values */
|
||||
#define USB_CDC_LINE_CTRL_BAUD_RATE LINE_CTRL_BAUD_RATE
|
||||
#define USB_CDC_LINE_CTRL_DCD LINE_CTRL_DCD
|
||||
#define USB_CDC_LINE_CTRL_DSR LINE_CTRL_DSR
|
||||
#define USB_CDC_LINE_CTRL_BREAK BIT(5)
|
||||
#define USB_CDC_LINE_CTRL_RING_SIGNAL BIT(6)
|
||||
#define USB_CDC_LINE_CTRL_FRAMING BIT(7)
|
||||
#define USB_CDC_LINE_CTRL_PARITY BIT(8)
|
||||
#define USB_CDC_LINE_CTRL_OVER_RUN BIT(9)
|
||||
|
||||
/** UART State Bitmap Values */
|
||||
#define SERIAL_STATE_OVERRUN 0x40
|
||||
#define SERIAL_STATE_OVER_RUN 0x40
|
||||
#define SERIAL_STATE_PARITY 0x20
|
||||
#define SERIAL_STATE_FRAMING 0x10
|
||||
#define SERIAL_STATE_RING 0x08
|
||||
#define SERIAL_STATE_RING_SIGNAL 0x08
|
||||
#define SERIAL_STATE_BREAK 0x04
|
||||
#define SERIAL_STATE_TX_CARRIER 0x02
|
||||
#define SERIAL_STATE_RX_CARRIER 0x01
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue