diff options
| author | [email protected] <[email protected]> | 2012-10-05 14:19:28 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-10-05 14:19:28 +0000 |
| commit | bb6b79880060819c7be55282c588ff9950d9830b (patch) | |
| tree | c6b2403fda7bfcf1adadbeb1297e4a64a6fb882c /components/drivers/include | |
| parent | 3816661798d3e27bb26d0676d76b48cce7b18b44 (diff) | |
add default config for serial_configure structure
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2317 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/drivers/serial.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/components/drivers/include/drivers/serial.h b/components/drivers/include/drivers/serial.h index b5c39c6dd0..30c82f6664 100644 --- a/components/drivers/include/drivers/serial.h +++ b/components/drivers/include/drivers/serial.h @@ -56,7 +56,19 @@ #define RT_SERIAL_ERR_OVERRUN 0x01 #define RT_SERIAL_ERR_FRAMING 0x02 -#define RT_SERIAL_ERR_PARITY 0x03 +#define RT_SERIAL_ERR_PARITY 0x03
+
+/* Default config for serial_configure structure */
+#define RT_SERIAL_CONFIG_DEFAULT \
+{ \
+ BAUD_RATE_115200, /* 115200 bits/s */ \
+ DATA_BITS_8, /* 8 databits */ \
+ STOP_BITS_1, /* 1 stopbit */ \
+ PARITY_NONE, /* No parity */ \
+ BIT_ORDER_LSB, /* LSB first sent */ \
+ NRZ_NORMAL, /* Normal mode */ \
+ 0 \
+} \ struct serial_ringbuffer { |
