add Temlate
This commit is contained in:
parent
9e3668d6de
commit
f2601db64b
19
Template/keyscan.md
Normal file
19
Template/keyscan.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# 按键扫描模板
|
||||||
|
|
||||||
|
## 修改使用
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(key == 0)
|
||||||
|
{
|
||||||
|
Delay(10);
|
||||||
|
if(key ==0 )
|
||||||
|
{
|
||||||
|
if(num >= 996)
|
||||||
|
num=0;
|
||||||
|
else
|
||||||
|
num++;
|
||||||
|
while(!key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user