change RTGUI path in SConstruct, update application.c to start RTGUI demo automatically, set idle's hook to reduce the cpu consumption.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2426 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
goprife@gmail.com 2012-11-18 08:35:23 +00:00
parent 4a5dea7807
commit 20a57ea77c
1 changed files with 22 additions and 0 deletions

View File

@ -64,6 +64,20 @@ void rt_init_thread_entry(void* parameter)
#endif
}
#endif
#ifdef WIN32
{
extern void low_cpu(void);
rt_thread_idle_sethook(low_cpu);
}
#endif
#ifdef RT_USING_RTGUI
{
extern void application_init(void);
rt_thread_delay(RT_TICK_PER_SECOND);
application_init();
}
#endif
}
void rt_test_thread_entry(void* parameter)
@ -95,6 +109,12 @@ int rt_application_init()
return 0;
}
#ifdef WIN32
#include <windows.h>
void low_cpu(void)
{
Sleep(1000);
}
#ifndef _CRT_TERMINATE_DEFINED
#define _CRT_TERMINATE_DEFINED
@ -109,6 +129,8 @@ void rt_hw_exit(void)
}
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_exit, exit, exit rt-thread);
#endif
#include <dfs_posix.h>
void test_fs(void)
{