[BSP] remove rt_device_init_all() invoking.
This commit is contained in:
parent
a8224dcb82
commit
26118499e0
|
@ -138,8 +138,6 @@ void rt_init_thread_entry(void* parameter)
|
||||||
/* register ethernetif device */
|
/* register ethernetif device */
|
||||||
eth_system_device_init();
|
eth_system_device_init();
|
||||||
rt_hw_macb_init();
|
rt_hw_macb_init();
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
/* init lwip system */
|
/* init lwip system */
|
||||||
lwip_sys_init();
|
lwip_sys_init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ int main(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
rt_device_init_all();
|
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
#ifdef RT_USING_FINSH
|
||||||
|
|
|
@ -62,9 +62,6 @@ void rtthread_startup(void)
|
||||||
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
|
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
|
||||||
&uart0);
|
&uart0);
|
||||||
|
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
rt_console_set_device("uart0");
|
rt_console_set_device("uart0");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -114,9 +114,6 @@ void rtthread_startup(void)
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
/* init all devices */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init finsh */
|
/* init finsh */
|
||||||
#ifdef RT_USING_FINSH
|
#ifdef RT_USING_FINSH
|
||||||
finsh_system_init();
|
finsh_system_init();
|
||||||
|
|
|
@ -118,8 +118,6 @@ void rtthread_startup(void)
|
||||||
/* init sd card device */
|
/* init sd card device */
|
||||||
rt_hw_sdcard_init();
|
rt_hw_sdcard_init();
|
||||||
#endif
|
#endif
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
|
@ -118,8 +118,6 @@ void rtthread_startup(void)
|
||||||
/* init sd card device */
|
/* init sd card device */
|
||||||
rt_hw_sdcard_init();
|
rt_hw_sdcard_init();
|
||||||
#endif
|
#endif
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
|
@ -118,8 +118,6 @@ void rtthread_startup(void)
|
||||||
/* init sd card device */
|
/* init sd card device */
|
||||||
rt_hw_sdcard_init();
|
rt_hw_sdcard_init();
|
||||||
#endif
|
#endif
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
|
@ -16,20 +16,13 @@
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
#include "LPC17xx.h"
|
|
||||||
#include "board.h"
|
|
||||||
|
|
||||||
#ifdef RT_USING_DFS
|
|
||||||
#include "sd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup LPC17
|
* @addtogroup LPC176x
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
#include <board.h>
|
||||||
extern int rt_application_init(void);
|
extern int rt_application_init(void);
|
||||||
|
|
||||||
#ifdef __CC_ARM
|
#ifdef __CC_ARM
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
|
@ -84,14 +77,6 @@ void rtthread_startup(void)
|
||||||
/* initialize scheduler system */
|
/* initialize scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
#ifdef RT_USING_DFS
|
|
||||||
rt_hw_sdcard_init();
|
|
||||||
#endif
|
|
||||||
/* initialize all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* initialize application */
|
/* initialize application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,6 @@ void rt_init_thread_entry(void *parameter)
|
||||||
|
|
||||||
/* register ethernetif device */
|
/* register ethernetif device */
|
||||||
lpc17xx_emac_hw_init();
|
lpc17xx_emac_hw_init();
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init lwip system */
|
/* init lwip system */
|
||||||
lwip_sys_init();
|
lwip_sys_init();
|
||||||
|
@ -78,13 +76,11 @@ void rt_init_thread_entry(void *parameter)
|
||||||
{
|
{
|
||||||
extern void rtgui_system_server_init(void);
|
extern void rtgui_system_server_init(void);
|
||||||
extern void application_init(void);
|
extern void application_init(void);
|
||||||
|
|
||||||
rt_device_t lcd;
|
rt_device_t lcd;
|
||||||
|
|
||||||
/* init lcd */
|
/* init lcd */
|
||||||
rt_hw_lcd_init();
|
rt_hw_lcd_init();
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* find lcd device */
|
/* find lcd device */
|
||||||
lcd = rt_device_find("lcd");
|
lcd = rt_device_find("lcd");
|
||||||
|
|
|
@ -100,9 +100,6 @@ void rtthread_startup(void)
|
||||||
|
|
||||||
/* init hardware serial device */
|
/* init hardware serial device */
|
||||||
rt_hw_serial_init();
|
rt_hw_serial_init();
|
||||||
|
|
||||||
/*init all registed devices*/
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
|
|
|
@ -33,14 +33,11 @@ void rt_init_thread_entry(void *parameter)
|
||||||
|
|
||||||
/* init Display Controller */
|
/* init Display Controller */
|
||||||
rt_hw_dc_init();
|
rt_hw_dc_init();
|
||||||
|
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* find Display Controller device */
|
/* find Display Controller device */
|
||||||
dc = rt_device_find("dc");
|
dc = rt_device_find("dc");
|
||||||
|
|
||||||
/* set Display Controller device as rtgui graphic driver */
|
/* set Display Controller device as rtgui graphic driver */
|
||||||
rtgui_graphic_set_device(dc);
|
rtgui_graphic_set_device(dc);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,7 +56,7 @@ int rt_application_init(void)
|
||||||
tid = rt_thread_create("init",
|
tid = rt_thread_create("init",
|
||||||
rt_init_thread_entry, RT_NULL,
|
rt_init_thread_entry, RT_NULL,
|
||||||
4096, 8, 20);
|
4096, 8, 20);
|
||||||
if (tid != RT_NULL)
|
if (tid != RT_NULL)
|
||||||
rt_thread_startup(tid);
|
rt_thread_startup(tid);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -64,11 +64,6 @@ void rtthread_startup(void)
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
@ -85,7 +80,7 @@ void rtthread_startup(void)
|
||||||
rt_system_scheduler_start();
|
rt_system_scheduler_start();
|
||||||
|
|
||||||
/* never reach here */
|
/* never reach here */
|
||||||
return;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
|
@ -50,7 +50,7 @@ SECTIONS
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__rt_init_start = .;
|
__rt_init_start = .;
|
||||||
KEEP(*(SORT(.rti_fn*)))
|
KEEP(*(SORT(.rti_fn*)))
|
||||||
__rt_init_end = .;
|
__rt_init_end = .;
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,6 @@ void rtthread_startup(void)
|
||||||
|
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
|
@ -44,10 +44,7 @@ void rt_init_thread_entry(void *parameter)
|
||||||
rt_hw_adc_init();
|
rt_hw_adc_init();
|
||||||
rt_hw_lcd_init();
|
rt_hw_lcd_init();
|
||||||
rt_hw_cpu_init();
|
rt_hw_cpu_init();
|
||||||
|
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
#ifdef RT_USING_RTGUI
|
#ifdef RT_USING_RTGUI
|
||||||
extern void rtgui_system_server_init(void);
|
extern void rtgui_system_server_init(void);
|
||||||
|
|
||||||
|
|
|
@ -59,13 +59,9 @@ void rtthread_startup(void)
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DEVICE
|
#ifdef RT_USING_DEVICE
|
||||||
#ifdef RT_USING_DFS
|
#if defined(RT_USING_DFS) && defined(RT_USING_DFS_UFFS)
|
||||||
#ifdef RT_USING_DFS_UFFS
|
|
||||||
rt_hw_nand_init();
|
rt_hw_nand_init();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
/* initialize all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* initialize application */
|
/* initialize application */
|
||||||
|
@ -91,7 +87,7 @@ int main(void)
|
||||||
{
|
{
|
||||||
/* disable interrupt first */
|
/* disable interrupt first */
|
||||||
rt_hw_interrupt_disable();
|
rt_hw_interrupt_disable();
|
||||||
|
|
||||||
/* startup RT-Thread RTOS */
|
/* startup RT-Thread RTOS */
|
||||||
rtthread_startup();
|
rtthread_startup();
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,6 @@ void rtthread_startup(void)
|
||||||
#ifdef RT_USING_DEVICE
|
#ifdef RT_USING_DEVICE
|
||||||
/* init hardware serial device */
|
/* init hardware serial device */
|
||||||
rt_hw_serial_init();
|
rt_hw_serial_init();
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
|
|
|
@ -151,9 +151,6 @@ void rt_init_thread_entry(void *parameter)
|
||||||
|
|
||||||
/* init keypad */
|
/* init keypad */
|
||||||
rt_hw_key_init();
|
rt_hw_key_init();
|
||||||
|
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* find lcd device */
|
/* find lcd device */
|
||||||
lcd = rt_device_find("lcd");
|
lcd = rt_device_find("lcd");
|
||||||
|
@ -175,9 +172,6 @@ void rt_init_thread_entry(void *parameter)
|
||||||
/* register ethernetif device */
|
/* register ethernetif device */
|
||||||
rt_hw_dm9000_init();
|
rt_hw_dm9000_init();
|
||||||
|
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init lwip system */
|
/* init lwip system */
|
||||||
lwip_sys_init();
|
lwip_sys_init();
|
||||||
rt_kprintf("TCP/IP initialized!\n");
|
rt_kprintf("TCP/IP initialized!\n");
|
||||||
|
@ -197,9 +191,6 @@ void rt_init_thread_entry(void *parameter)
|
||||||
/* init keypad */
|
/* init keypad */
|
||||||
rt_hw_key_init();
|
rt_hw_key_init();
|
||||||
|
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* create ftk thread */
|
/* create ftk thread */
|
||||||
ftk_thread = rt_thread_create("ftk",
|
ftk_thread = rt_thread_create("ftk",
|
||||||
rt_ftk_thread_entry, RT_NULL,
|
rt_ftk_thread_entry, RT_NULL,
|
||||||
|
|
|
@ -126,9 +126,6 @@ void rtthread_startup(void)
|
||||||
|
|
||||||
/* rtc init */
|
/* rtc init */
|
||||||
rt_hw_rtc_init();
|
rt_hw_rtc_init();
|
||||||
|
|
||||||
/*init all registed devices */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
|
|
|
@ -79,9 +79,6 @@ void rtthread_startup()
|
||||||
eth_system_device_init();
|
eth_system_device_init();
|
||||||
rt_hw_dm9161_init();
|
rt_hw_dm9161_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*init all registed devices */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
|
@ -108,10 +105,8 @@ void rtthread_startup()
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
rt_uint32_t UNUSED level;
|
|
||||||
|
|
||||||
/* disable interrupt first */
|
/* disable interrupt first */
|
||||||
level = rt_hw_interrupt_disable();
|
rt_hw_interrupt_disable();
|
||||||
|
|
||||||
/* startup RT-Thread RTOS */
|
/* startup RT-Thread RTOS */
|
||||||
rtthread_startup();
|
rtthread_startup();
|
||||||
|
|
|
@ -116,9 +116,6 @@ void rtthread_startup(void)
|
||||||
#ifdef RT_USING_DFS
|
#ifdef RT_USING_DFS
|
||||||
rt_hw_sdcard_init();
|
rt_hw_sdcard_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*init all registed devices*/
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
|
|
|
@ -78,20 +78,6 @@ void rtthread_startup()
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
|
|
||||||
#ifdef RT_USING_DFS
|
|
||||||
/* Not implemented */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_LWIP
|
|
||||||
/* Not implemented */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*init all registed devices */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
|
|
@ -58,10 +58,6 @@ void rtthread_startup(void)
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
/* init all device */
|
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
|
|
@ -86,11 +86,6 @@ void rtthread_startup(void)
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
|
|
@ -81,9 +81,6 @@ void rtthread_startup(void)
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
|
|
@ -122,9 +122,6 @@ void rt_init_thread_entry(void* parameter)
|
||||||
/* init touch panel */
|
/* init touch panel */
|
||||||
rtgui_touch_hw_init();
|
rtgui_touch_hw_init();
|
||||||
|
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* find lcd device */
|
/* find lcd device */
|
||||||
lcd = rt_device_find("lcd");
|
lcd = rt_device_find("lcd");
|
||||||
|
|
||||||
|
|
|
@ -66,12 +66,9 @@ void rt_init_thread_entry(void* parameter)
|
||||||
|
|
||||||
/* register ethernetif device */
|
/* register ethernetif device */
|
||||||
eth_system_device_init();
|
eth_system_device_init();
|
||||||
|
|
||||||
/* initialize eth interface */
|
/* initialize eth interface */
|
||||||
rt_hw_stm32_eth_init();
|
rt_hw_stm32_eth_init();
|
||||||
|
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init lwip system */
|
/* init lwip system */
|
||||||
lwip_sys_init();
|
lwip_sys_init();
|
||||||
|
|
|
@ -107,9 +107,6 @@ void rtthread_startup(void)
|
||||||
|
|
||||||
rt_hw_rtc_init();
|
rt_hw_rtc_init();
|
||||||
|
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,6 @@ void rt_init_thread_entry(void* parameter)
|
||||||
eth_system_device_init();
|
eth_system_device_init();
|
||||||
|
|
||||||
rt_hw_stm32_eth_init();
|
rt_hw_stm32_eth_init();
|
||||||
/* re-init device driver */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init lwip system */
|
/* init lwip system */
|
||||||
lwip_sys_init();
|
lwip_sys_init();
|
||||||
|
|
|
@ -85,9 +85,6 @@ void rtthread_startup(void)
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,6 @@ void rtthread_startup(void)
|
||||||
/* init scheduler system */
|
/* init scheduler system */
|
||||||
rt_system_scheduler_init();
|
rt_system_scheduler_init();
|
||||||
|
|
||||||
#ifdef RT_USING_DEVICE
|
|
||||||
/* init all device */
|
|
||||||
rt_device_init_all();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init application */
|
/* init application */
|
||||||
rt_application_init();
|
rt_application_init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue