diff options
| author | Bernard Xiong <[email protected]> | 2021-05-28 16:20:08 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-28 16:20:08 +0800 |
| commit | 92beddf3bccf6346e26aa097f82464456fb8e6bd (patch) | |
| tree | 197e4a108118dda016ea02274172f0c40e7ee8ed /bsp/mb9bf618s | |
| parent | b18a99b44240ec3152011e159cc24a5af8dff0ce (diff) | |
| parent | 03f4d40e30f3c94e1db0b3a65b3610dee695694a (diff) | |
Merge pull request #4737 from mysterywolf/3,1,xformatv3.1.5
[lts 3.1.x] format codes
Diffstat (limited to 'bsp/mb9bf618s')
| -rw-r--r-- | bsp/mb9bf618s/applications/startup.c | 2 | ||||
| -rw-r--r-- | bsp/mb9bf618s/drivers/board.c | 2 | ||||
| -rw-r--r-- | bsp/mb9bf618s/drivers/serial.c | 22 | ||||
| -rw-r--r-- | bsp/mb9bf618s/drivers/serial.h | 30 | ||||
| -rw-r--r-- | bsp/mb9bf618s/rtconfig.h | 12 |
5 files changed, 34 insertions, 34 deletions
diff --git a/bsp/mb9bf618s/applications/startup.c b/bsp/mb9bf618s/applications/startup.c index 5ea4f5f6c4..22d38bcf95 100644 --- a/bsp/mb9bf618s/applications/startup.c +++ b/bsp/mb9bf618s/applications/startup.c @@ -39,7 +39,7 @@ void rtthread_startup(void) /* show version */ rt_show_version(); - + /* init timer system */ rt_system_timer_init(); diff --git a/bsp/mb9bf618s/drivers/board.c b/bsp/mb9bf618s/drivers/board.c index 946c17349c..8490e7a060 100644 --- a/bsp/mb9bf618s/drivers/board.c +++ b/bsp/mb9bf618s/drivers/board.c @@ -60,7 +60,7 @@ rt_uint32_t rt_hw_tick_get_microsecond(void) rt_tick_t tick; rt_uint32_t value; -#define TICK_US (1000000/RT_TICK_PER_SECOND) +#define TICK_US (1000000/RT_TICK_PER_SECOND) tick = rt_tick_get(); value = tick * TICK_US + (SysTick->LOAD - SysTick->VAL) * TICK_US / SysTick->LOAD; diff --git a/bsp/mb9bf618s/drivers/serial.c b/bsp/mb9bf618s/drivers/serial.c index 43a1cb45bd..79279e79e5 100644 --- a/bsp/mb9bf618s/drivers/serial.c +++ b/bsp/mb9bf618s/drivers/serial.c @@ -254,16 +254,16 @@ rt_err_t rt_hw_serial_register(rt_device_t device, const char* name, { RT_ASSERT(device != RT_NULL); - device->type = RT_Device_Class_Char; + device->type = RT_Device_Class_Char; device->rx_indicate = RT_NULL; device->tx_complete = RT_NULL; - device->init = rt_serial_init; - device->open = rt_serial_open; - device->close = rt_serial_close; - device->read = rt_serial_read; - device->write = rt_serial_write; - device->control = rt_serial_control; - device->user_data = serial; + device->init = rt_serial_init; + device->open = rt_serial_open; + device->close = rt_serial_close; + device->read = rt_serial_read; + device->write = rt_serial_write; + device->control = rt_serial_control; + device->user_data = serial; /* register a character device */ return rt_device_register(device, name, RT_DEVICE_FLAG_RDWR | flag); @@ -299,7 +299,7 @@ void rt_hw_serial_isr(rt_device_t device) #ifdef RT_USING_UART0 /* UART0 device driver structure */ -#define UART0 FM3_MFS0_UART +#define UART0 FM3_MFS0_UART struct serial_int_rx uart0_int_rx; struct serial_device uart0 = { @@ -323,7 +323,7 @@ void MFS0RX_IRQHandler(void) #ifdef RT_USING_UART2 /* UART2 device driver structure */ -#define UART2 FM3_MFS2_UART +#define UART2 FM3_MFS2_UART struct serial_int_rx uart2_int_rx; struct serial_device uart2 = { @@ -347,7 +347,7 @@ void MFS2RX_IRQHandler(void) #ifdef RT_USING_UART4 /* UART4 device driver structure */ -#define UART4 FM3_MFS4_UART +#define UART4 FM3_MFS4_UART struct serial_int_rx uart4_int_rx; struct serial_device uart4 = { diff --git a/bsp/mb9bf618s/drivers/serial.h b/bsp/mb9bf618s/drivers/serial.h index f26a161489..388f9eef86 100644 --- a/bsp/mb9bf618s/drivers/serial.h +++ b/bsp/mb9bf618s/drivers/serial.h @@ -6,7 +6,7 @@ * Change Logs: * Date Author Notes * 2006-03-13 Bernard first version - * 2011-05-15 lgnq modified according bernard's implementaion. + * 2011-05-15 lgnq modified according bernard's implementaion. */ #ifndef __RT_HW_SERIAL_H__ @@ -53,21 +53,21 @@ #define ESCR_DATABITS_7 0x03U #define ESCR_DATABITS_9 0x04U -#define BPS 115200 /* serial baudrate */ +#define BPS 115200 /* serial baudrate */ -#define UART_RX_BUFFER_SIZE 64 -#define UART_TX_BUFFER_SIZE 64 +#define UART_RX_BUFFER_SIZE 64 +#define UART_TX_BUFFER_SIZE 64 struct serial_int_rx { - rt_uint8_t rx_buffer[UART_RX_BUFFER_SIZE]; - rt_uint32_t read_index, save_index; + rt_uint8_t rx_buffer[UART_RX_BUFFER_SIZE]; + rt_uint32_t read_index, save_index; }; struct serial_int_tx { - rt_uint8_t tx_buffer[UART_TX_BUFFER_SIZE]; - rt_uint32_t write_index, save_index; + rt_uint8_t tx_buffer[UART_TX_BUFFER_SIZE]; + rt_uint32_t write_index, save_index; }; /* @@ -79,14 +79,14 @@ struct serial_int_tx struct serial_device { - FM3_MFS03_UART_TypeDef* uart_device; - /* irq number */ - IRQn_Type rx_irq, tx_irq; + FM3_MFS03_UART_TypeDef* uart_device; + /* irq number */ + IRQn_Type rx_irq, tx_irq; - /* rx structure */ - struct serial_int_rx* int_rx; - /* tx structure */ - struct serial_int_tx* int_tx; + /* rx structure */ + struct serial_int_rx* int_rx; + /* tx structure */ + struct serial_int_tx* int_tx; }; void rt_hw_serial_isr(rt_device_t device); diff --git a/bsp/mb9bf618s/rtconfig.h b/bsp/mb9bf618s/rtconfig.h index 1b647a7a30..d887692233 100644 --- a/bsp/mb9bf618s/rtconfig.h +++ b/bsp/mb9bf618s/rtconfig.h @@ -3,16 +3,16 @@ #define __RTTHREAD_CFG_H__ /* RT_NAME_MAX*/ -#define RT_NAME_MAX 8 +#define RT_NAME_MAX 8 /* RT_ALIGN_SIZE*/ -#define RT_ALIGN_SIZE 4 +#define RT_ALIGN_SIZE 4 /* PRIORITY_MAX */ -#define RT_THREAD_PRIORITY_MAX 32 +#define RT_THREAD_PRIORITY_MAX 32 /* Tick per Second */ -#define RT_TICK_PER_SECOND 100 +#define RT_TICK_PER_SECOND 100 /* SECTION: RT_DEBUG */ /* Thread Debug */ @@ -60,9 +60,9 @@ /* #define RT_TINY_SIZE */ #define RT_USING_CONSOLE /* the buffer size of console */ -#define RT_CONSOLEBUF_SIZE 128 +#define RT_CONSOLEBUF_SIZE 128 // <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart1" /> -#define RT_CONSOLE_DEVICE_NAME "uart0" +#define RT_CONSOLE_DEVICE_NAME "uart0" /* SECTION: finsh, a C-Express shell */ /* Using FinSH as Shell*/ |
