1 Star 0 Fork 0

DFRobot/DFRobot_utility

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
keycheck.h 914 Bytes
一键复制 编辑 原始数据 按行查看 历史
lisper 提交于 2014-11-07 10:10 +08:00 . fix
/**************************************************************************/
/*!
@file keycheck.h
@author lisper (lisper.li@dfrobot.com)
@license LGPLv3 (see license.txt)
key check for Arduino
Copyright (C) DFRobot - www.dfrobot.com
function: ispressed (uint16_t key, uint16_t state);
-> for digital pin
issticked (uint16_t key, uint16_t value);
-> for analog pin
issticked2 (uint16_t key, uint16_t left, uint16_t right);
-> for analog pin
*/
/**************************************************************************/
#ifdef __KEYCHECK__
#define __KEYCHECK__
uint16_t key_analog_range = 50;
uint16_t key_delay_time = 20;
//digital pin key 0 or 1
boolean ispressed (uint16_t key, uint16_t state);
//analog pin key
boolean issticked (uint16_t key, uint16_t range);
//analog pin key
boolean issticked2 (uint16_t key, uint16_t left, uint16_t right);
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dfrobot/DFRobot_utility.git
git@gitee.com:dfrobot/DFRobot_utility.git
dfrobot
DFRobot_utility
DFRobot_utility
master

搜索帮助