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.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
PollSwitch.cpp
00001 #include "PollSwitch.h" 00002 00003 PollSwitch::PollSwitch(DigitalIn *swArr, int numSw){ 00004 numSwitches = numSw; 00005 sw = swArr; 00006 } 00007 00008 char PollSwitch::poll(){ 00009 char i = 0; 00010 00011 // If a low signal is detected, previous switch is broken 00012 for (i = 0; i < numSwitches; i++) { 00013 if (sw[i].read() == 0) break; 00014 } 00015 if (i >= numSwitches) i = 0; 00016 else i++; 00017 return i; 00018 }
Generated on Fri Jul 15 2022 06:07:18 by
1.7.2
