对finsh_set_device调用增加宏定义限制
This commit is contained in:
parent
a3284876ff
commit
bd80b7a4a1
|
@ -38,7 +38,9 @@ int main(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(FINSH_DEVICE_NAME);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
rt_thread_idle_init();
|
||||
|
|
|
@ -62,7 +62,9 @@ void rtthread_startup(void)
|
|||
/* init finsh */
|
||||
extern int finsh_system_init(void);
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart0");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
rt_system_timer_thread_init();
|
||||
|
|
|
@ -111,7 +111,9 @@ void rtthread_startup(void)
|
|||
/* init finsh */
|
||||
#ifdef RT_USING_FINSH
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(CONSOLE_DEVICE);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Initialize gui server */
|
||||
|
|
|
@ -79,7 +79,9 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device( FINSH_DEVICE_NAME );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init timer thread */
|
||||
|
|
|
@ -106,7 +106,6 @@
|
|||
/* POSIX layer and C standard library */
|
||||
|
||||
#define RT_USING_LIBC
|
||||
// #define RT_USING_POSIX
|
||||
|
||||
/* Network */
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE)
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -119,7 +119,7 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#ifdef RT_USING_DEVICE
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -119,7 +119,7 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#ifdef RT_USING_DEVICE
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -28,8 +28,10 @@ void rt_init_thread_entry(void *parameter)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* initialize finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_VBUS
|
||||
rt_vbus_do_init();
|
||||
|
|
|
@ -59,8 +59,10 @@ void rt_init_thread_entry(void *parameter)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* initialize finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_VBUS
|
||||
rt_vbus_do_init();
|
||||
|
|
|
@ -65,7 +65,9 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart0");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init timer thread */
|
||||
|
|
|
@ -25,8 +25,9 @@ void rt_init_thread_entry(void *parameter)
|
|||
|
||||
|
||||
//finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
|
||||
#endif
|
||||
|
||||
/**< init led device */
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ void rt_init_thread_entry(void *parameter)
|
|||
#endif
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif /* RT_USING_FINSH */
|
||||
|
||||
/**< init led device */
|
||||
|
|
|
@ -84,7 +84,9 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init idle thread */
|
||||
|
|
|
@ -77,7 +77,7 @@ void rtthread_startup()
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#ifdef RT_USING_DEVICE
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart0");
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -60,7 +60,9 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init idle thread */
|
||||
|
|
|
@ -17,8 +17,10 @@ int main(void)
|
|||
{
|
||||
rt_thread_t thread;
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
#ifdef RT_USING_FINSH
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Create led thread */
|
||||
|
|
|
@ -48,7 +48,7 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#ifdef RT_USING_DEVICE
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -104,7 +104,9 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("sci2");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init soft timer thread */
|
||||
|
|
|
@ -60,8 +60,10 @@ void rt_init_thread_entry(void* parameter)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* initialize finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
/* initialize lwip stack */
|
||||
|
@ -130,7 +132,9 @@ void rt_init_thread_entry(void* parameter)
|
|||
#endif
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#endif /* RT_USING_FINSH */
|
||||
|
||||
/* Filesystem Initialization */
|
||||
|
|
|
@ -114,7 +114,9 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init idle thread */
|
||||
|
|
|
@ -87,7 +87,9 @@ void rt_init_thread_entry(void* parameter)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
LED_Init();
|
||||
|
|
|
@ -64,7 +64,7 @@ void rtthread_startup()
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#ifdef RT_USING_DEVICE
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart0");
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -53,7 +53,9 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart1");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init soft timer thread */
|
||||
|
|
|
@ -64,7 +64,9 @@ void rtthread_startup(void)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device("uart0");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* init timer thread */
|
||||
|
|
|
@ -23,8 +23,10 @@ void rt_init_thread_entry(void *parameter)
|
|||
#ifdef RT_USING_FINSH
|
||||
/* initialize finsh */
|
||||
finsh_system_init();
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
/*the led thread*/
|
||||
ALIGN(RT_ALIGN_SIZE)
|
||||
|
|
|
@ -168,7 +168,7 @@ extern struct finsh_syscall *_syscall_table_begin, *_syscall_table_end;
|
|||
/* find out system call, which should be implemented in user program */
|
||||
struct finsh_syscall *finsh_syscall_lookup(const char *name);
|
||||
|
||||
#ifdef RT_USING_DEVICE
|
||||
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE)
|
||||
void finsh_set_device(const char *device_name);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -91,7 +91,6 @@ void finsh_set_echo(rt_uint32_t echo);
|
|||
rt_uint32_t finsh_get_echo(void);
|
||||
|
||||
int finsh_system_init(void);
|
||||
void finsh_set_device(const char *device_name);
|
||||
const char *finsh_get_device(void);
|
||||
int finsh_getchar(void);
|
||||
|
||||
|
|
Loading…
Reference in New Issue