Skip to content

Commit 0f20ebd

Browse files
committed
uart: expanded common line controls command
add LINE_CTRL_{PARITY, STOPBIT, DATABITS} commands Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
1 parent 8e89206 commit 0f20ebd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

include/uart.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,28 @@ extern "C" {
4343
#define LINE_CTRL_DTR (1 << 2)
4444
#define LINE_CTRL_DCD (1 << 3)
4545
#define LINE_CTRL_DSR (1 << 4)
46+
#define LINE_CTRL_PARITY (1 << 5)
47+
#define LINE_CTRL_STOPBITS (1 << 6)
48+
#define LINE_CTRL_DATABITS (1 << 7)
49+
50+
/* Avaliable params for LINE_CTRL_{PARITY, STOPBITS, DATABITS} */
51+
enum {
52+
LINE_CTRL_PARITY_NONE = 0,
53+
LINE_CTRL_PARITY_EVEN,
54+
LINE_CTRL_PARITY_ODD,
55+
};
56+
57+
enum {
58+
LINE_CTRL_STOPBITS_1 = 0,
59+
LINE_CTRL_STOPBITS_2,
60+
LINE_CTRL_STOPBITS_1_5,
61+
};
62+
63+
enum {
64+
LINE_CTRL_DATABITS_8 = 0,
65+
LINE_CTRL_DATABITS_7,
66+
LINE_CTRL_DATABITS_9,
67+
};
4668

4769
/* Common communication errors for UART.*/
4870

0 commit comments

Comments
 (0)