[mw_shl_code=c,true]if(ret == KEY0_PRESS)
{
if(GPIO_ReadOutputDataBit(GPIOA,GPIO_Pin_8))
{
//????
GPIO_WriteBit(GPIOA,GPIO_Pin_8,Bit_RESET);
}
else
{
//?¨??
GPIO_WriteBit(GPIOA,GPIO_Pin_8,Bit_SET);
}
}
if(ret == KEY1_PRESS)
{
if(GPIO_ReadInputDataBit(GPIOD,GPIO_Pin_2))
{
//????
GPIO_WriteBit(GPIOD,GPIO_Pin_2,Bit_RESET);
}
else
{
//?¨??
GPIO_WriteBit(GPIOD,GPIO_Pin_2,Bit_SET);
}
}
[/mw_shl_code]
[mw_shl_code=c,true]如上代码: GPIO_ReadInputDataBit 和 GPIO_ReadOutputDataBit 都可以读出led灯的状态,我想问下这2个函数有什么区别?[/mw_shl_code]
[mw_shl_code=c,true]
[/mw_shl_code]
|