Miya Miyagawa
/
mainboardnrp2018
aaaaa
Input/Switch/Switch.cpp
- Committer:
- Ryosei
- Date:
- 2019-02-18
- Revision:
- 9:6901b1dfa688
- Parent:
- 1:e73cf2469f83
- Child:
- 10:53a92f2ab1c4
File content as of revision 9:6901b1dfa688:
#include "Switch.h" #include <stdint.h> DigitalIn limitSw[] = { 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; } }