LED_Flash
void LED_Flash(void)
{
static U32 counter=0 ;
static U8 f=0 ;
if(gTimer_1ms-counter>=500)
counter=gTimer_1ms;
else
return;
// GPIOC->ODR = GPIOC->ODR ^(0x000f<<8);
if(f==0)
{
f=1 ;
GPIO_SetBits(GPIOC,GPIO_Pin_8);
}
else
{
f=0 ;
GPIO_ResetBits(GPIOC,GPIO_Pin_8);
}
}
{
static U32 counter=0 ;
static U8 f=0 ;
if(gTimer_1ms-counter>=500)
counter=gTimer_1ms;
else
return;
// GPIOC->ODR = GPIOC->ODR ^(0x000f<<8);
if(f==0)
{
f=1 ;
GPIO_SetBits(GPIOC,GPIO_Pin_8);
}
else
{
f=0 ;
GPIO_ResetBits(GPIOC,GPIO_Pin_8);
}
}

浙公网安备 33010602011771号