![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
If you wont to knock me down, look this file...
Input/Switch/Switch.cpp
- Committer:
- Ryosei
- Date:
- 2019-05-03
- Revision:
- 0:4df75b08b14a
File content as of revision 0:4df75b08b14a:
#include "Switch.h" #include <stdint.h> DigitalIn limitSw[] = { DigitalIn(LIMITSW0_PIN), DigitalIn(LIMITSW1_PIN), DigitalIn(LIMITSW2_PIN), DigitalIn(LIMITSW3_PIN), }; namespace SWITCH { void Switch::Initialize(void) { for(uint8_t i = 0; i < MOUNTING_LIMITSW_NUM; i++) limitSw[i].mode(PullUp); } bool Switch::checkPushed(int mySwitch) { return mySwitch ? false : true; } }