Rename components_init.c/.h to components.c/.h.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2295 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
b07bd9b030
commit
f7e6104397
|
@ -1,8 +1,8 @@
|
||||||
from building import *
|
from building import *
|
||||||
|
|
||||||
cwd = GetCurrentDir()
|
cwd = GetCurrentDir()
|
||||||
src = Glob('*.c')
|
src = Glob('*.c')
|
||||||
CPPPATH = [cwd]
|
CPPPATH = [cwd]
|
||||||
group = DefineGroup('Components', src, depend = ['RT_USING_COMPONENTS_INIT'], CPPPATH = CPPPATH)
|
group = DefineGroup('Components', src, depend = ['RT_USING_COMPONENTS_INIT'], CPPPATH = CPPPATH)
|
||||||
|
|
||||||
Return('group')
|
Return('group')
|
||||||
|
|
|
@ -1,124 +1,94 @@
|
||||||
#include <rtthread.h>
|
/*
|
||||||
#include "components_init.h"
|
* File : components.c
|
||||||
|
* This file is part of RT-Thread RTOS
|
||||||
#ifdef RT_USING_FINSH
|
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||||
#include <finsh.h>
|
*
|
||||||
#include <shell.h>
|
* The license and distribution terms for this file may be
|
||||||
#endif
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rt-thread.org/license/LICENSE
|
||||||
#ifdef RT_USING_LWIP
|
*
|
||||||
#include <lwip/sys.h>
|
* Change Logs:
|
||||||
#include <netif/ethernetif.h>
|
* Date Author Notes
|
||||||
extern void lwip_system_init(void);
|
* 2012-09-20 Bernard Change the name to components.c
|
||||||
#endif
|
* And all components related header files.
|
||||||
|
*/
|
||||||
#ifdef RT_USING_DFS
|
#include "components.h"
|
||||||
#include <dfs_init.h>
|
|
||||||
#ifdef RT_USING_DFS_ELMFAT
|
/**
|
||||||
#include <dfs_elm.h>
|
* RT-Thread Components Initialization
|
||||||
#endif
|
*/
|
||||||
#ifdef RT_USING_DFS_NFS
|
void rt_components_init(void)
|
||||||
#include <dfs_nfs.h>
|
{
|
||||||
#endif
|
#ifdef RT_USING_MODULE
|
||||||
#ifdef RT_USING_DFS_ROMFS
|
rt_system_module_init();
|
||||||
#include <dfs_romfs.h>
|
#endif
|
||||||
#endif
|
|
||||||
#ifdef RT_USING_DFS_DEVFS
|
#ifdef RT_USING_FINSH
|
||||||
#include <devfs.h>
|
/* initialize finsh */
|
||||||
#endif
|
finsh_system_init();
|
||||||
#ifdef RT_USING_DFS_UFFS
|
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||||
#include <dfs_uffs.h>
|
#endif
|
||||||
#endif
|
|
||||||
#ifdef RT_USING_DFS_JFFS2
|
#ifdef RT_USING_LWIP
|
||||||
#include <dfs_jffs2.h>
|
/* initialize lwip stack */
|
||||||
#endif
|
/* register ethernetif device */
|
||||||
#ifdef RT_USING_DFS_YAFFS2
|
eth_system_device_init();
|
||||||
#include <dfs_yaffs2.h>
|
|
||||||
#endif
|
/* initialize lwip system */
|
||||||
#endif
|
lwip_system_init();
|
||||||
|
rt_kprintf("TCP/IP initialized!\n");
|
||||||
#ifdef RT_USING_NEWLIB
|
#endif
|
||||||
#include <libc.h>
|
|
||||||
#endif
|
#ifdef RT_USING_DFS
|
||||||
#ifdef RT_USING_PTHREADS
|
/* initialize the device file system */
|
||||||
#include <pthread.h>
|
dfs_init();
|
||||||
#endif
|
|
||||||
|
#ifdef RT_USING_DFS_ELMFAT
|
||||||
/**
|
/* initialize the elm chan FatFS file system*/
|
||||||
* RT-Thread Components Initialization
|
elm_init();
|
||||||
*/
|
#endif
|
||||||
void rt_components_init(void)
|
|
||||||
{
|
#if defined(RT_USING_DFS_NFS) && defined(RT_USING_LWIP)
|
||||||
#ifdef RT_USING_MODULE
|
/* initialize NFSv3 client file system */
|
||||||
rt_system_module_init();
|
nfs_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
#ifdef RT_USING_DFS_YAFFS2
|
||||||
/* initialize finsh */
|
dfs_yaffs2_init();
|
||||||
finsh_system_init();
|
#endif
|
||||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
|
||||||
#endif
|
#ifdef RT_USING_DFS_UFFS
|
||||||
|
dfs_uffs_init();
|
||||||
#ifdef RT_USING_LWIP
|
#endif
|
||||||
/* initialize lwip stack */
|
|
||||||
/* register ethernetif device */
|
#ifdef RT_USING_DFS_JFFS2
|
||||||
eth_system_device_init();
|
dfs_jffs2_init();
|
||||||
|
#endif
|
||||||
/* initialize lwip system */
|
|
||||||
lwip_system_init();
|
#ifdef RT_USING_DFS_ROMFS
|
||||||
rt_kprintf("TCP/IP initialized!\n");
|
dfs_romfs_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_DFS
|
#ifdef RT_USING_DFS_DEVFS
|
||||||
/* initialize the device file system */
|
devfs_init();
|
||||||
dfs_init();
|
#endif
|
||||||
|
#endif /* end of RT_USING_DFS */
|
||||||
#ifdef RT_USING_DFS_ELMFAT
|
|
||||||
/* initialize the elm chan FatFS file system*/
|
#ifdef RT_USING_NEWLIB
|
||||||
elm_init();
|
libc_system_init(RT_CONSOLE_DEVICE_NAME);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(RT_USING_DFS_NFS) && defined(RT_USING_LWIP)
|
#ifdef RT_USING_PTHREADS
|
||||||
/* initialize NFSv3 client file system */
|
pthread_system_init();
|
||||||
nfs_init();
|
#endif
|
||||||
#endif
|
|
||||||
|
#ifdef RT_USING_RTGUI
|
||||||
#ifdef RT_USING_DFS_YAFFS2
|
rtgui_system_server_init();
|
||||||
dfs_yaffs2_init();
|
#endif
|
||||||
#endif
|
|
||||||
|
#ifdef RT_USING_USB_HOST
|
||||||
#ifdef RT_USING_DFS_UFFS
|
rt_usb_host_init();
|
||||||
dfs_uffs_init();
|
#endif
|
||||||
#endif
|
|
||||||
|
return;
|
||||||
#ifdef RT_USING_DFS_JFFS2
|
}
|
||||||
dfs_jffs2_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_DFS_ROMFS
|
|
||||||
dfs_romfs_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_DFS_DEVFS
|
|
||||||
devfs_init();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_NEWLIB
|
|
||||||
libc_system_init(RT_CONSOLE_DEVICE_NAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_PTHREADS
|
|
||||||
pthread_system_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_RTGUI
|
|
||||||
rtgui_system_server_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_USB_HOST
|
|
||||||
rt_usb_host_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
/*
|
||||||
|
* File : components_init.h
|
||||||
|
* This file is part of RT-Thread RTOS
|
||||||
|
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rt-thread.org/license/LICENSE
|
||||||
|
*
|
||||||
|
* Change Logs:
|
||||||
|
* Date Author Notes
|
||||||
|
* 2012-09-20 Bernard Change the name to components.h
|
||||||
|
* And all components related header files.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __COMPONENTS_INIT_H__
|
||||||
|
#define __COMPONENTS_INIT_H__
|
||||||
|
|
||||||
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
#ifdef RT_USING_FINSH
|
||||||
|
#include <finsh.h>
|
||||||
|
#include <shell.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_LWIP
|
||||||
|
#include <lwip/sys.h>
|
||||||
|
#include <netif/ethernetif.h>
|
||||||
|
extern void lwip_system_init(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_DFS
|
||||||
|
#include <dfs_init.h>
|
||||||
|
#ifdef RT_USING_DFS_ELMFAT
|
||||||
|
#include <dfs_elm.h>
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_DFS_NFS
|
||||||
|
#include <dfs_nfs.h>
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_DFS_ROMFS
|
||||||
|
#include <dfs_romfs.h>
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_DFS_DEVFS
|
||||||
|
#include <devfs.h>
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_DFS_UFFS
|
||||||
|
#include <dfs_uffs.h>
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_DFS_JFFS2
|
||||||
|
#include <dfs_jffs2.h>
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_DFS_YAFFS2
|
||||||
|
#include <dfs_yaffs2.h>
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_DFS_ROMFS
|
||||||
|
#include <dfs_romfs.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_NEWLIB
|
||||||
|
#include <libc.h>
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_PTHREADS
|
||||||
|
#include <pthread.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_MODULE
|
||||||
|
#include <rtm.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RT_USING_RTGUI
|
||||||
|
#include <rtgui/rtgui_system.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes components in RT-Thread
|
||||||
|
* notes: this function must be invoked in thread
|
||||||
|
*/
|
||||||
|
void rt_components_init(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,15 +0,0 @@
|
||||||
/*
|
|
||||||
* components_init.h
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __COMPONENTS_INIT_H__
|
|
||||||
#define __COMPONENTS_INIT_H__
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes components in RT-Thread
|
|
||||||
* notes: this function must be invoked in thread
|
|
||||||
*/
|
|
||||||
void rt_components_init(void);
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue