Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 }
Generated on Fri Jul 15 2022 17:22:44 by
1.7.2