summaryrefslogtreecommitdiff
path: root/bsp/rm48x50
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/rm48x50')
-rw-r--r--bsp/rm48x50/application/startup.c66
-rw-r--r--bsp/rm48x50/drivers/board.c4
-rw-r--r--bsp/rm48x50/drivers/board.h130
-rw-r--r--bsp/rm48x50/drivers/drv_uart.c2
-rw-r--r--bsp/rm48x50/rtconfig.h58
5 files changed, 130 insertions, 130 deletions
diff --git a/bsp/rm48x50/application/startup.c b/bsp/rm48x50/application/startup.c
index 2b6311bc42..44b081ad07 100644
--- a/bsp/rm48x50/application/startup.c
+++ b/bsp/rm48x50/application/startup.c
@@ -71,27 +71,27 @@ void rtthread_startup(void)
*rt_hw_cpu_dcache_enable();
*/
- /* init hardware interrupt */
- rt_hw_interrupt_init();
+ /* init hardware interrupt */
+ rt_hw_interrupt_init();
- /* init board */
- rt_hw_board_init();
+ /* init board */
+ rt_hw_board_init();
- /* init tick */
- rt_system_tick_init();
+ /* init tick */
+ rt_system_tick_init();
- /* init kernel object */
- rt_system_object_init();
+ /* init kernel object */
+ rt_system_object_init();
- rt_show_version();
+ rt_show_version();
- /* init timer system */
- rt_system_timer_init();
+ /* init timer system */
+ rt_system_timer_init();
- /* init memory system */
+ /* init memory system */
#ifdef RT_USING_HEAP
#ifdef __CC_ARM
- rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)MEMEND);
+ rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)MEMEND);
#elif defined(__GNUC__)
rt_system_heap_init((void*)&__bss_end, (void*)MEMEND);
#elif defined(__TI_COMPILER_VERSION__)
@@ -101,40 +101,40 @@ void rtthread_startup(void)
#endif
#endif
- /* init scheduler system */
- rt_system_scheduler_init();
+ /* init scheduler system */
+ rt_system_scheduler_init();
- /* init application */
- rt_application_init();
+ /* init application */
+ rt_application_init();
#ifdef RT_USING_FINSH
- /* init finsh */
- finsh_system_init();
- finsh_set_device("sci2");
+ /* init finsh */
+ finsh_system_init();
+ finsh_set_device("sci2");
#endif
- /* init soft timer thread */
- rt_system_timer_thread_init();
+ /* init soft timer thread */
+ rt_system_timer_thread_init();
- /* init idle thread */
- rt_thread_idle_init();
+ /* init idle thread */
+ rt_thread_idle_init();
- /* start scheduler */
- rt_system_scheduler_start();
+ /* start scheduler */
+ rt_system_scheduler_start();
- /* never reach here */
- return ;
+ /* never reach here */
+ return ;
}
int main(void)
{
- /* disable interrupt first */
- rt_hw_interrupt_disable();
+ /* disable interrupt first */
+ rt_hw_interrupt_disable();
- /* invoke rtthread_startup */
- rtthread_startup();
+ /* invoke rtthread_startup */
+ rtthread_startup();
- return 0;
+ return 0;
}
/*@}*/
diff --git a/bsp/rm48x50/drivers/board.c b/bsp/rm48x50/drivers/board.c
index 2ff930ce11..27dc8abb00 100644
--- a/bsp/rm48x50/drivers/board.c
+++ b/bsp/rm48x50/drivers/board.c
@@ -28,14 +28,14 @@
void rt_timer_handler(int vector, void* param)
{
rtiREG1->INTFLAG = 8U; /* clear interrupt flag */
- rt_tick_increase();
+ rt_tick_increase();
}
void rt_hw_board_init(void)
{
rtiInit();
- rt_hw_interrupt_install(RTI_INT_VEC, rt_timer_handler, RT_NULL, "tick");
+ rt_hw_interrupt_install(RTI_INT_VEC, rt_timer_handler, RT_NULL, "tick");
rt_hw_interrupt_umask(RTI_INT_VEC);
rtiStartCounter(rtiCOUNTER_BLOCK1);
diff --git a/bsp/rm48x50/drivers/board.h b/bsp/rm48x50/drivers/board.h
index 8ac5b3f48c..62223efced 100644
--- a/bsp/rm48x50/drivers/board.h
+++ b/bsp/rm48x50/drivers/board.h
@@ -18,7 +18,7 @@
/* RT_USING_UART */
#define RT_USING_UART1
#define RT_USING_UART2
-#define RT_UART_RX_BUFFER_SIZE 64
+#define RT_UART_RX_BUFFER_SIZE 64
void rt_hw_board_init(void);
void rt_hw_led_set(int led);
void rt_hw_led_flash(void);
@@ -27,93 +27,93 @@ void rt_hw_led_flash(void);
void rt_hw_finsh_init(void);
#endif
-#define USE_USB 0
+#define USE_USB 0
-#if USE_USB /* 1 is USB, 0 is non-USB related */
-#define PLL_MValue 11
-#define PLL_NValue 0
-#define CCLKDivValue 4
-#define USBCLKDivValue 5
+#if USE_USB /* 1 is USB, 0 is non-USB related */
+#define PLL_MValue 11
+#define PLL_NValue 0
+#define CCLKDivValue 4
+#define USBCLKDivValue 5
-#define Fosc 12000000
-#define Fcclk 57600000
-#define Fcco 288000000
+#define Fosc 12000000
+#define Fcclk 57600000
+#define Fcco 288000000
#else
-#define PLL_MValue 12
-#define PLL_NValue 1
-#define CCLKDivValue 5
+#define PLL_MValue 12
+#define PLL_NValue 1
+#define CCLKDivValue 5
-#define Fosc 12000000
-#define Fcclk 72000000
-#define Fcco 360000000
+#define Fosc 12000000
+#define Fcclk 72000000
+#define Fcco 360000000
#endif
#if USE_USB
-#define Fpclk (Fcclk / 2)
+#define Fpclk (Fcclk / 2)
#else
-#define Fpclk (Fcclk / 4)
+#define Fpclk (Fcclk / 4)
#endif
/* IRQ define */
-#define SYS32Mode 0x1F
-#define IRQ32Mode 0x12
-#define FIQ32Mode 0x11
+#define SYS32Mode 0x1F
+#define IRQ32Mode 0x12
+#define FIQ32Mode 0x11
-#define HIGHEST_PRIORITY 0x01
-#define LOWEST_PRIORITY 0x0F
+#define HIGHEST_PRIORITY 0x01
+#define LOWEST_PRIORITY 0x0F
-#define WDT_INT 0
-#define SWI_INT 1
-#define ARM_CORE0_INT 2
-#define ARM_CORE1_INT 3
-#define TIMER0_INT 4
-#define TIMER1_INT 5
-#define UART0_INT 6
-#define UART1_INT 7
-#define PWM0_1_INT 8
-#define I2C0_INT 9
-#define SPI0_INT 10 /* SPI and SSP0 share VIC slot */
-#define SSP0_INT 10
-#define SSP1_INT 11
-#define PLL_INT 12
-#define RTC_INT 13
-#define EINT0_INT 14
-#define EINT1_INT 15
-#define EINT2_INT 16
-#define EINT3_INT 17
-#define ADC0_INT 18
-#define I2C1_INT 19
-#define BOD_INT 20
-#define EMAC_INT 21
-#define USB_INT 22
-#define CAN_INT 23
-#define MCI_INT 24
-#define GPDMA_INT 25
-#define TIMER2_INT 26
-#define TIMER3_INT 27
-#define UART2_INT 28
-#define UART3_INT 29
-#define I2C2_INT 30
-#define I2S_INT 31
+#define WDT_INT 0
+#define SWI_INT 1
+#define ARM_CORE0_INT 2
+#define ARM_CORE1_INT 3
+#define TIMER0_INT 4
+#define TIMER1_INT 5
+#define UART0_INT 6
+#define UART1_INT 7
+#define PWM0_1_INT 8
+#define I2C0_INT 9
+#define SPI0_INT 10 /* SPI and SSP0 share VIC slot */
+#define SSP0_INT 10
+#define SSP1_INT 11
+#define PLL_INT 12
+#define RTC_INT 13
+#define EINT0_INT 14
+#define EINT1_INT 15
+#define EINT2_INT 16
+#define EINT3_INT 17
+#define ADC0_INT 18
+#define I2C1_INT 19
+#define BOD_INT 20
+#define EMAC_INT 21
+#define USB_INT 22
+#define CAN_INT 23
+#define MCI_INT 24
+#define GPDMA_INT 25
+#define TIMER2_INT 26
+#define TIMER3_INT 27
+#define UART2_INT 28
+#define UART3_INT 29
+#define I2C2_INT 30
+#define I2S_INT 31
-#define VIC_SIZE 32
+#define VIC_SIZE 32
-#define VECT_ADDR_INDEX 0x100
+#define VECT_ADDR_INDEX 0x100
#define VECT_CNTL_INDEX 0x200
-#define CCLK 60000000 /* Fosc = 12MHz, M = 5 */
-#define PCLK 15000000 /* CCLK/4, use default */
+#define CCLK 60000000 /* Fosc = 12MHz, M = 5 */
+#define PCLK 15000000 /* CCLK/4, use default */
/******************************************************************************
-** Function name: TargetInit
+** Function name: TargetInit
**
-** Descriptions: Initialize the target board; it is called in a
-** necessary place, change it as needed
+** Descriptions: Initialize the target board; it is called in a
+** necessary place, change it as needed
**
-** parameters: None
-** Returned value: None
+** parameters: None
+** Returned value: None
**
******************************************************************************/
extern void TargetInit(void);
diff --git a/bsp/rm48x50/drivers/drv_uart.c b/bsp/rm48x50/drivers/drv_uart.c
index d42a52bc6b..2ebea5ad4f 100644
--- a/bsp/rm48x50/drivers/drv_uart.c
+++ b/bsp/rm48x50/drivers/drv_uart.c
@@ -194,7 +194,7 @@ void rt_hw_uart_init(void)
config.parity = PARITY_NONE;
config.stop_bits = STOP_BITS_1;
config.invert = NRZ_NORMAL;
- config.bufsz = RT_SERIAL_RB_BUFSZ;
+ config.bufsz = RT_SERIAL_RB_BUFSZ;
_sci2_serial.ops = &_sci_ops;
_sci2_serial.config = config;
diff --git a/bsp/rm48x50/rtconfig.h b/bsp/rm48x50/rtconfig.h
index f7d9235a5b..e7ae2ed7ae 100644
--- a/bsp/rm48x50/rtconfig.h
+++ b/bsp/rm48x50/rtconfig.h
@@ -5,19 +5,19 @@
// <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
// <integer name="RT_NAME_MAX" description="Maximal size of kernel object name length" default="6" />
-#define RT_NAME_MAX 6
+#define RT_NAME_MAX 6
// <integer name="RT_ALIGN_SIZE" description="Alignment size for CPU architecture data access" default="4" />
-#define RT_ALIGN_SIZE 4
+#define RT_ALIGN_SIZE 4
// <integer name="RT_THREAD_PRIORITY_MAX" description="Maximal level of thread priority" default="32">
// <item description="8">8</item>
// <item description="32">32</item>
// <item description="256">256</item>
// </integer>
-#define RT_THREAD_PRIORITY_MAX 32
+#define RT_THREAD_PRIORITY_MAX 32
// <integer name="RT_TICK_PER_SECOND" description="OS tick per second" default="100" />
-#define RT_TICK_PER_SECOND 100
+#define RT_TICK_PER_SECOND 100
// <integer name="IDLE_THREAD_STACK_SIZE" description="The stack size of idle thread" default="512" />
-#define IDLE_THREAD_STACK_SIZE 512
+#define IDLE_THREAD_STACK_SIZE 512
// <section name="RT_DEBUG" description="Kernel Debug Configuration" default="true" >
//#define RT_DEBUG
// <bool name="RT_THREAD_DEBUG" description="Thread debug enable" default="false" />
@@ -31,11 +31,11 @@
// <section name="RT_USING_TIMER_SOFT" description="Using software timer which will start a thread to handle soft-timer" default="true" >
// #define RT_USING_TIMER_SOFT
// <integer name="RT_TIMER_THREAD_PRIO" description="The priority level of timer thread" default="4" />
-#define RT_TIMER_THREAD_PRIO 4
+#define RT_TIMER_THREAD_PRIO 4
// <integer name="RT_TIMER_THREAD_STACK_SIZE" description="The stack size of timer thread" default="512" />
-#define RT_TIMER_THREAD_STACK_SIZE 512
+#define RT_TIMER_THREAD_STACK_SIZE 512
// <integer name="RT_TIMER_TICK_PER_SECOND" description="The soft-timer tick per second" default="10" />
-#define RT_TIMER_TICK_PER_SECOND 10
+#define RT_TIMER_TICK_PER_SECOND 10
// </section>
// <section name="IPC" description="Inter-Thread communication" default="always" >
@@ -78,9 +78,9 @@
// <section name="RT_USING_CONSOLE" description="Using console" default="true" >
#define RT_USING_CONSOLE
// <integer name="RT_CONSOLEBUF_SIZE" description="The buffer size for console output" default="128" />
-#define RT_CONSOLEBUF_SIZE 128
+#define RT_CONSOLEBUF_SIZE 128
// <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart" />
-#define RT_CONSOLE_DEVICE_NAME "sci2"
+#define RT_CONSOLE_DEVICE_NAME "sci2"
// </section>
// <bool name="RT_USING_COMPONENTS_INIT" description="Using RT-Thread components initialization" default="true" />
@@ -92,7 +92,7 @@
// <bool name="FINSH_USING_DESCRIPTION" description="Keeping description in symbol table" default="true" />
#define FINSH_USING_DESCRIPTION
// <integer name="FINSH_THREAD_STACK_SIZE" description="The stack size for finsh thread" default="4096" />
-#define FINSH_THREAD_STACK_SIZE 4096
+#define FINSH_THREAD_STACK_SIZE 4096
// </section>
// <section name="LIBC" description="C Runtime library setting" default="always" >
@@ -107,18 +107,18 @@
// <bool name="DFS_USING_WORKDIR" description="Using working directory" default="true" />
// #define DFS_USING_WORKDIR
// <integer name="DFS_FILESYSTEMS_MAX" description="The maximal number of mounted file system" default="4" />
-#define DFS_FILESYSTEMS_MAX 2
+#define DFS_FILESYSTEMS_MAX 2
// <integer name="DFS_FD_MAX" description="The maximal number of opened files" default="4" />
-#define DFS_FD_MAX 4
+#define DFS_FD_MAX 4
// <bool name="RT_USING_DFS_ELMFAT" description="Using ELM FatFs" default="true" />
#define RT_USING_DFS_ELMFAT
// <integer name="RT_DFS_ELM_USE_LFN" description="Support long file name" default="0">
// <item description="LFN1">1</item>
// <item description="LFN1">2</item>
// </integer>
-#define RT_DFS_ELM_USE_LFN 1
+#define RT_DFS_ELM_USE_LFN 1
// <integer name="RT_DFS_ELM_MAX_LFN" description="Maximal size of file name length" default="255" />
-#define RT_DFS_ELM_MAX_LFN 64
+#define RT_DFS_ELM_MAX_LFN 64
// <bool name="RT_USING_DFS_YAFFS2" description="Using YAFFS2" default="false" />
// #define RT_USING_DFS_YAFFS2
// <bool name="RT_USING_DFS_UFFS" description="Using UFFS" default="false" />
@@ -128,7 +128,7 @@
// <bool name="RT_USING_DFS_NFS" description="Using NFS v3 client file system" default="false" />
// #define RT_USING_DFS_NFS
// <string name="RT_NFS_HOST_EXPORT" description="NFSv3 host export" default="192.168.1.5:/" />
-#define RT_NFS_HOST_EXPORT "192.168.1.5:/"
+#define RT_NFS_HOST_EXPORT "192.168.1.5:/"
// </section>
// <section name="RT_USING_LWIP" description="lwip, a lightweight TCP/IP protocol stack" default="true" >
@@ -146,31 +146,31 @@
// <bool name="RT_LWIP_DNS" description="Enable DNS protocol" default="true" />
#define RT_LWIP_DNS
// <integer name="RT_LWIP_PBUF_NUM" description="Maximal number of buffers in the pbuf pool" default="4" />
-#define RT_LWIP_PBUF_NUM 4
+#define RT_LWIP_PBUF_NUM 4
// <integer name="RT_LWIP_TCP_PCB_NUM" description="Maximal number of simultaneously active TCP connections" default="5" />
-#define RT_LWIP_TCP_PCB_NUM 3
+#define RT_LWIP_TCP_PCB_NUM 3
// <integer name="RT_LWIP_TCP_SND_BUF" description="TCP sender buffer size" default="8192" />
-#define RT_LWIP_TCP_SND_BUF 2048
+#define RT_LWIP_TCP_SND_BUF 2048
// <integer name="RT_LWIP_TCP_WND" description="TCP receive window" default="8192" />
-#define RT_LWIP_TCP_WND 2048
+#define RT_LWIP_TCP_WND 2048
// <bool name="RT_LWIP_SNMP" description="Enable SNMP protocol" default="false" />
// #define RT_LWIP_SNMP
// <bool name="RT_LWIP_DHCP" description="Enable DHCP client to get IP address" default="false" />
// #define RT_LWIP_DHCP
// <integer name="RT_LWIP_TCP_SEG_NUM" description="the number of simultaneously queued TCP" default="4" />
-#define RT_LWIP_TCP_SEG_NUM 4
+#define RT_LWIP_TCP_SEG_NUM 4
// <integer name="RT_LWIP_TCPTHREAD_PRIORITY" description="the thread priority of TCP thread" default="128" />
-#define RT_LWIP_TCPTHREAD_PRIORITY 12
+#define RT_LWIP_TCPTHREAD_PRIORITY 12
// <integer name="RT_LWIP_TCPTHREAD_MBOX_SIZE" description="the mail box size of TCP thread to wait for" default="32" />
-#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
+#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
// <integer name="RT_LWIP_TCPTHREAD_STACKSIZE" description="the thread stack size of TCP thread" default="4096" />
-#define RT_LWIP_TCPTHREAD_STACKSIZE 4096
+#define RT_LWIP_TCPTHREAD_STACKSIZE 4096
// <integer name="RT_LWIP_ETHTHREAD_PRIORITY" description="the thread priority of ethnetif thread" default="144" />
-#define RT_LWIP_ETHTHREAD_PRIORITY 14
+#define RT_LWIP_ETHTHREAD_PRIORITY 14
// <integer name="RT_LWIP_ETHTHREAD_MBOX_SIZE" description="the mail box size of ethnetif thread to wait for" default="8" />
-#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
+#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
// <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" />
-#define RT_LWIP_ETHTHREAD_STACKSIZE 512
+#define RT_LWIP_ETHTHREAD_STACKSIZE 512
// <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" />
#define RT_LWIP_IPADDR0 192
#define RT_LWIP_IPADDR1 168
@@ -191,7 +191,7 @@
// <section name="RT_USING_RTGUI" description="RT-Thread/GUI" default="true" >
// #define RT_USING_RTGUI
// <integer name="RTGUI_NAME_MAX" description="the name size of RT-Thread/GUI widget/objects" default="12" />
-#define RTGUI_NAME_MAX 12
+#define RTGUI_NAME_MAX 12
// <bool name="RTGUI_USING_SMALL_SIZE" description="use small size in RT-Thread/GUI" default="true" />
#define RTGUI_USING_SMALL_SIZE
// <bool name="RTGUI_USING_FONT16" description="support 16 weight font" default="true" />
@@ -201,7 +201,7 @@
// <bool name="RTGUI_USING_FONTHZ" description="support Chinese font" default="true" />
#define RTGUI_USING_FONTHZ
// <integer name="RTGUI_DEFAULT_FONT_SIZE" description="default font size in RT-Thread/GUI" default="16" />
-#define RTGUI_DEFAULT_FONT_SIZE 16
+#define RTGUI_DEFAULT_FONT_SIZE 16
// <bool name="RTGUI_USING_DFS_FILERW" description="use RT-Thread/DFS as file interface" default="true" />
// #define RTGUI_USING_DFS_FILERW
// <bool name="RTGUI_USING_HZ_BMP" description="use Chinese font bitmap engine" default="true" />