fix the led_examples_project

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@127 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong 2009-10-23 06:16:38 +00:00
parent f5bcb86743
commit a599ab3b62
1 changed files with 8 additions and 0 deletions

View File

@ -57,8 +57,16 @@ void rt_hw_led_off(rt_uint32_t n)
#ifdef RT_USING_FINSH
#include <finsh.h>
static rt_uint8_t led_inited = 0;
void led(rt_uint32_t led, rt_uint32_t value)
{
/* init led configuration if it's not inited. */
if (!led_inited)
{
rt_hw_led_init();
led_inited = 1;
}
if ( led == 0 )
{
/* set led status */