summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authortanek liang <[email protected]>2017-07-01 13:38:39 +0800
committertanek liang <[email protected]>2017-07-01 13:38:39 +0800
commitd7c5c4e35e0bad023bd13e3fbf6a2d13f13eabbf (patch)
tree8f7022b50b11ea0fd86f27b5e17fd4acacb7125f /bsp
parent50d96d7d0aba41f4ba0a7c762b76fc1452a57dfc (diff)
using components init
Diffstat (limited to 'bsp')
-rw-r--r--bsp/frdm-k64f/applications/application.c24
-rw-r--r--bsp/frdm-k64f/rtconfig.h3
2 files changed, 6 insertions, 21 deletions
diff --git a/bsp/frdm-k64f/applications/application.c b/bsp/frdm-k64f/applications/application.c
index f311c9a77c..f31581a920 100644
--- a/bsp/frdm-k64f/applications/application.c
+++ b/bsp/frdm-k64f/applications/application.c
@@ -29,32 +29,14 @@
#include <lwip/sys.h>
#include <lwip/api.h>
#include <netif/ethernetif.h>
-#include "stm32_eth.h"
#endif
void rt_init_thread_entry(void* parameter)
{
- /* LwIP Initialization */
-#ifdef RT_USING_LWIP
- {
- extern void lwip_sys_init(void);
-
- /* register ethernetif device */
- eth_system_device_init();
-
- rt_hw_stm32_eth_init();
- /* re-init device driver */
- rt_device_init_all();
-
- /* init lwip system */
- lwip_sys_init();
- rt_kprintf("TCP/IP initialized!\n");
- }
+#ifdef RT_USING_COMPONENTS_INIT
+ /* initialization RT-Thread Components */
+ rt_components_init();
#endif
-
-//FS
-
-//GUI
}
float f_var1;
diff --git a/bsp/frdm-k64f/rtconfig.h b/bsp/frdm-k64f/rtconfig.h
index 6b676e1fe5..32c611e2b8 100644
--- a/bsp/frdm-k64f/rtconfig.h
+++ b/bsp/frdm-k64f/rtconfig.h
@@ -64,6 +64,9 @@
/* Using Serial Device Driver Framework" default="true" */
#define RT_USING_SERIAL
+// <section name="RT_USING_COMPONENTS_INIT" description="Using components init" default="false" >
+#define RT_USING_COMPONENTS_INIT
+// </section>
/* SECTION: Console options */
#define RT_USING_CONSOLE