语言用的是C
有两种写法:
while(1){
delay(100);
if(press){
func();
}
}
while(1){
if(press){
func();
}
delay(100);
}
press是硬件按钮输入,按下为True。
老师表示下面的写法不行,不能去颤。
我不能理解,上下在执行时是一样的啊,求大神解释。
有两种写法:
while(1){
delay(100);
if(press){
func();
}
}
while(1){
if(press){
func();
}
delay(100);
}
press是硬件按钮输入,按下为True。
老师表示下面的写法不行,不能去颤。
我不能理解,上下在执行时是一样的啊,求大神解释。