Ai
1 Star 0 Fork 0

DFRobot/pxt-Micro-Diorama

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
LCD.cpp 621 Bytes
一键复制 编辑 原始数据 按行查看 历史
之昂张666 提交于 2019-08-07 15:06 +08:00 . V1.0
#include "pxt.h"
using namespace pxt;
namespace LCD {
bool initialized = false;
//%
void pinInit() {
if (initialized) return;
// mount buttons on the pins with a pullup mode
// TODO: fix this issue in the DAL itself
#define ALLOC_PIN_BUTTON(id) new MicroBitButton(getPin(id)->name, id, MICROBIT_BUTTON_ALL_EVENTS, PullUp);
ALLOC_PIN_BUTTON(MICROBIT_ID_IO_P6);
ALLOC_PIN_BUTTON(MICROBIT_ID_IO_P7);
ALLOC_PIN_BUTTON(MICROBIT_ID_IO_P8);
ALLOC_PIN_BUTTON(MICROBIT_ID_IO_P9);
ALLOC_PIN_BUTTON(MICROBIT_ID_IO_P10);
#undef ALLOC_PIN_BUTTON
initialized = true;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dfrobot/pxt-Micro-Diorama.git
git@gitee.com:dfrobot/pxt-Micro-Diorama.git
dfrobot
pxt-Micro-Diorama
pxt-Micro-Diorama
master

搜索帮助