1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 */ 9 #include <rtthread.h> 10 #include "board.h" 11 platform_init(void)12int platform_init(void) 13 { 14 #ifdef RT_USING_LWIP 15 #ifdef RT_USING_TAPNETIF 16 tap_netif_hw_init(); 17 #else 18 pcap_netif_hw_init(); 19 #endif 20 #endif 21 22 #ifdef RT_USING_DFS 23 /* initialize sd card */ 24 rt_hw_sdcard_init(); 25 26 #ifdef RT_USING_MTD_NAND 27 rt_hw_mtd_nand_init(); 28 #endif /* RT_USING_MTD_NAND */ 29 30 #ifdef RT_USING_MTD_NOR 31 sst25vfxx_mtd_init("nor", 0, RT_UINT32_MAX); 32 #endif /* RT_USING_MTD_NOR */ 33 34 #endif /* RT_USING_DFS */ 35 36 return 0; 37 } 38 INIT_COMPONENT_EXPORT(platform_init); 39 platform_post_init(void)40int platform_post_init(void) 41 { 42 #ifdef PKG_USING_GUIENGINE 43 { 44 extern void rt_hw_sdl_start(void); 45 extern int rtgui_system_server_init(void); 46 47 rtgui_system_server_init(); 48 rt_hw_sdl_start(); 49 } 50 #endif 51 return 0; 52 } 53 INIT_COMPONENT_EXPORT(platform_post_init); 54