文件名称:7_3_Key_Long_Short_Mealy
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2014-07-25
- 文件大小:
- 99kb
- 下载次数:
- 0次
- 提 供 者:
- 林**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
WDT定时器设置为16ms中断。在WDT中断中,记录下最近两次的IO状态存在KEY_Now和KEY_Past中。根据前高后低可判断按键下,前低后高可判断按键松开,存入标志位Key_Dect中。
Key_Dect作为输入量,利用状态机函数Key_SM(),判断出短按键事件和长按键事件。分别调用各自事件处理函数进行处理。-WDT timer 16ms interrupt. In the WDT interrupt, the presence of KEY_Now and KEY_Past record the last two IO state. According to the high to low can determine the key, low before high judgment the key is released, stored in the Key_Dect flag.
Key_Dect as input, using the state machine function Key_SM (), the short and long key press event key events. Are calling their respective event processing function.
Key_Dect作为输入量,利用状态机函数Key_SM(),判断出短按键事件和长按键事件。分别调用各自事件处理函数进行处理。-WDT timer 16ms interrupt. In the WDT interrupt, the presence of KEY_Now and KEY_Past record the last two IO state. According to the high to low can determine the key, low before high judgment the key is released, stored in the Key_Dect flag.
Key_Dect as input, using the state machine function Key_SM (), the short and long key press event key events. Are calling their respective event processing function.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
7_3_Key_Long_Short_Mealy\7_3_Key_Long_Short_Mealy.dep
........................\7_3_Key_Long_Short_Mealy.ewd
........................\7_3_Key_Long_Short_Mealy.ewp
........................\7_3_Key_Long_Short_Mealy.eww
........................\7_3_Key_Long_Short_MealyCustomSfr.sfr
........................\Debug\Exe\7_3_Key_Long_Short_Mealy.d43
........................\.....\Obj\7_3_Key_Long_Short_Mealy.pbd
........................\.....\...\7_3_Key_Long_Short_Mealy.pbd.browse
........................\.....\...\main.pbi
........................\.....\...\main.pbi.cout
........................\.....\...\main.r43
........................\main.c
........................\path.txt
........................\settings\7_3_Key_Long_Short_Mealy.cspy.bat
........................\........\7_3_Key_Long_Short_Mealy.dbgdt
........................\........\7_3_Key_Long_Short_Mealy.dni
........................\........\7_3_Key_Long_Short_Mealy.wsdt
........................\Debug\Exe
........................\.....\List
........................\.....\Obj
........................\Debug
........................\settings
7_3_Key_Long_Short_Mealy