#include "led.h"
#include "delay.h"
#include "sys.h"
#include "key.h"
//ALIENTEK Mini STM32??·?°?·????ú??2
//°??ü???????é
//?????§????www.openedv.com
//?????????í??×?????????????
int main(void)
{
u8 t=0;
delay_init(); //???±??????????
LED_Init(); //????????LED??????????????
KEY_Init(); //????????°??ü??????????????
LED0=1; //????LED
LED1=0; //????LED
while(1)
{
t=KEY_Scan(0); //?????ü??
switch(t)
{
case KEY0_PRES:
LED0=!LED0;
break;
case KEY1_PRES:
LED1=!LED1;
break;
case WKUP_PRES:
LED0=!LED0;
LED1=!LED1;
break;
default:
delay_ms(10);
}
}
}
中的按键为何无法用???
while(1)
{
t=KEY_Scan(0); //?????ü??
switch(t)
{
case KEY0_PRES:
LED0=!LED0;
break;
case KEY1_PRES:
LED1=!LED1;
break;
case WKUP_PRES:
LED0=!LED0;
LED1=!LED1;
break;
default:
delay_ms(10);
}
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
还是先提升下问问题方法吧
一周热门 更多>