From d0debf9892c21f04b209e6c837b3e3d0af0598d0 Mon Sep 17 00:00:00 2001 From: bernard Date: Thu, 10 Jul 2014 13:32:16 +0800 Subject: [PATCH] [Drivers] Make code cleanup in serial framework. --- components/drivers/include/drivers/serial.h | 6 ++++++ components/drivers/serial/serial.c | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/drivers/include/drivers/serial.h b/components/drivers/include/drivers/serial.h index 41132ed916..9655820736 100644 --- a/components/drivers/include/drivers/serial.h +++ b/components/drivers/include/drivers/serial.h @@ -30,9 +30,15 @@ #include +#define BAUD_RATE_2400 2400 #define BAUD_RATE_4800 4800 #define BAUD_RATE_9600 9600 +#define BAUD_RATE_38400 38400 +#define BAUD_RATE_57600 57600 #define BAUD_RATE_115200 115200 +#define BAUD_RATE_230400 230400 +#define BAUD_RATE_460800 460800 +#define BAUD_RATE_921600 921600 #define DATA_BITS_5 5 #define DATA_BITS_6 6 diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index 622d2cd68c..61c03fa955 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -162,9 +162,6 @@ static rt_err_t rt_serial_init(struct rt_device *dev) rt_data_queue_init(&(serial->tx_dq), RT_SERIAL_TX_DATAQUEUE_SIZE, RT_SERIAL_TX_DATAQUEUE_LWM, RT_NULL); } - - /* set activated */ - dev->flag |= RT_DEVICE_FLAG_ACTIVATED; } return result;