diff options
Diffstat (limited to 'bsp/sam7x/startup.c')
| -rw-r--r-- | bsp/sam7x/startup.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/bsp/sam7x/startup.c b/bsp/sam7x/startup.c index 513c9244f9..abf9b58c51 100644 --- a/bsp/sam7x/startup.c +++ b/bsp/sam7x/startup.c @@ -15,16 +15,16 @@ #include <rthw.h> #include <rtthread.h> -#include "board.h"
+#include "board.h" -#ifdef RT_USING_DFS
-#include "sd.h"
-#endif
-
-#ifdef RT_USING_LWIP
-#include "sam7x_emac.h"
-extern rt_err_t eth_system_device_init(void);
-#endif
+#ifdef RT_USING_DFS +#include "sd.h" +#endif + +#ifdef RT_USING_LWIP +#include "sam7x_emac.h" +extern rt_err_t eth_system_device_init(void); +#endif #ifdef RT_USING_FINSH #include <finsh.h> @@ -113,16 +113,9 @@ void rtthread_startup(void) /* init hardware serial device */ rt_hw_serial_init(); -#ifdef RT_USING_LWIP - eth_system_device_init(); - - /* register AT91 EMAC device */ - sam7xether_register("E0"); -#endif
- -#ifdef RT_USING_DFS
- rt_hw_sdcard_init();
-#endif
+#ifdef RT_USING_DFS + rt_hw_sdcard_init(); +#endif /*init all registed devices*/ rt_device_init_all(); @@ -147,6 +140,7 @@ void rtthread_startup(void) return ; } +#ifdef __CC_ARM int main (void) { /* invoke rtthread_startup */ @@ -154,5 +148,6 @@ int main (void) return 0; } +#endif /*@}*/ |
