High-efficiency key detection method
A detection method and high-efficiency technology, applied in error detection/correction, detection of faulty computer hardware, instruments, etc., can solve problems such as increasing program complexity, reducing program real-time performance, and low detection efficiency, and saving MCU resources. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Examples
Embodiment 1
[0016] Provide a high-efficiency button detection method,
[0017] First define some variables, which are used to control the button scanning frequency, record the result of the last button detection PrevKeyValue, the result of this detection button KeyValue, the long press time count KeyLongCount and the long press flag KeyLongFlag;
[0018] Add one to the variable used to control the key scanning frequency every specific time, and the specific time is less than 10ms. When the accumulated time is greater than or equal to 20ms, start detecting the key and clear the variable used to control the key scanning frequency for the next time detection;
[0019] Then assign the value of the result KeyValue of this detection button to the result PrevKeyValue of the last button detection, and then clear the value of the result KeyValue of this detection button;
[0020] Then start to detect the value of the key this time, read the state of the IO port connected to the key, and then assi...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com