update kernel examples

fixed an error in timer_control.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1730 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz
2011-09-26 02:50:43 +00:00
parent b886a19bf9
commit 9bb329daee
5 changed files with 11 additions and 3 deletions

View File

@@ -13,6 +13,8 @@ static rt_uint8_t count;
/* 定时器超时函数 */
static void timeout1(void* parameter)
{
rt_tick_t timeout = 50;
rt_kprintf("periodic timer is timeout\n");
count ++;
@@ -20,7 +22,7 @@ static void timeout1(void* parameter)
if (count >= 8)
{
/* 控制定时器然后更改超时时间长度 */
rt_timer_control(timer1, RT_TIMER_CTRL_SET_TIME, (void*)50);
rt_timer_control(timer1, RT_TIMER_CTRL_SET_TIME, (void *)&timeout);
count = 0;
}
}