GithubHelp home page GithubHelp logo

cotkey's Introduction

MCU 按键模块

介绍

轻量级的按键动作识别代码:

  • 移植方便,只需要实现硬件 IO 初始化和 IO 状态读取即可

  • 丰富的接口实现,通过这些接口能及时处理按键操作,同时可以实现单击、双击、多击、短按和长按等多种要求的功能

  • 代码量少,且代码注释丰富,风格统一,便于阅读和使用

软件架构

文件介绍
  • key.c 和 key.h

    实现具体功能,对外提供的 API 接口函数

  • keyio.c 和 keyio.h

    硬件接口功能,实现 IO 初始化和 IO 状态读取函数;移植需要修改

使用说明

  1. 移植需修改或者实现 keyio.c 相关硬件接口函数;

  2. 使用前初始化函数 KEY_Init

  3. 通过函数 KEY_Register 注册按键动作触发回调函数

  4. 周期调用函数 KEY_Scan, 用来扫描按键动作并触发回调函数处理

关于作者

  1. CSDN 博客 blog.csdn.com
  2. 联系邮箱 [email protected]
  3. 了解更多可关注微信公众号

大橙子疯嵌入式

cotkey's People

Contributors

constzpc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.