Dead by Daylight

Dependencies:   mbed Servo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Switch.cpp Source File

Switch.cpp

00001 #include "Switch.h"
00002 #include <stdint.h>
00003 
00004 DigitalIn limitSw[] = {
00005     //DigitalIn(LIMITSW0_PIN),
00006     //DigitalIn(LIMITSW1_PIN),
00007     //DigitalIn(LIMITSW2_PIN),
00008     DigitalIn(LIMITSW3_PIN),
00009 };
00010 
00011 namespace SWITCH
00012 {
00013     void Switch::Initialize(void) {
00014         for(uint8_t i = 0; i < MOUNTING_LIMITSW_NUM; i++) limitSw[i].mode(PullUp);
00015     }
00016 
00017     bool Switch::checkPushed(int mySwitch) {
00018         return mySwitch ? false : true;
00019     }
00020 }