From fca920751761da33a58fb9565fea31f7099f826d Mon Sep 17 00:00:00 2001 From: Jackistang Date: Mon, 6 Sep 2021 13:27:40 +0800 Subject: serial: add CTS/RTS flowcontrol. --- components/drivers/include/drivers/serial.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'components') diff --git a/components/drivers/include/drivers/serial.h b/components/drivers/include/drivers/serial.h index c2e951e9b1..f0d0edbfad 100644 --- a/components/drivers/include/drivers/serial.h +++ b/components/drivers/include/drivers/serial.h @@ -77,6 +77,9 @@ #define RT_SERIAL_TX_DATAQUEUE_SIZE 2048 #define RT_SERIAL_TX_DATAQUEUE_LWM 30 +#define RT_SERIAL_FLOWCONTROL_CTSRTS 1 +#define RT_SERIAL_FLOWCONTROL_NONE 0 + /* Default config for serial_configure structure */ #define RT_SERIAL_CONFIG_DEFAULT \ { \ @@ -87,6 +90,7 @@ BIT_ORDER_LSB, /* LSB first sent */ \ NRZ_NORMAL, /* Normal mode */ \ RT_SERIAL_RB_BUFSZ, /* Buffer size */ \ + RT_SERIAL_FLOWCONTROL_NONE, /* Off flowcontrol */ \ 0 \ } @@ -100,7 +104,8 @@ struct serial_configure rt_uint32_t bit_order :1; rt_uint32_t invert :1; rt_uint32_t bufsz :16; - rt_uint32_t reserved :6; + rt_uint32_t flowcontrol :1; + rt_uint32_t reserved :5; }; /* -- cgit v1.3.1