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
Diff: PollSwitch/PollSwitch.cpp
- Revision:
- 29:f148490b5f65
- Parent:
- 17:c9ce210f6654
diff -r 2e83002d452d -r f148490b5f65 PollSwitch/PollSwitch.cpp
--- a/PollSwitch/PollSwitch.cpp Fri Nov 07 01:26:37 2014 +0000
+++ b/PollSwitch/PollSwitch.cpp Sat Nov 08 17:15:14 2014 +0000
@@ -28,6 +28,8 @@
}
// bit on: switch may be broken
- switchState = (1 << i);
- return (1 << i);
+ if (i < sizeof(sw)/sizeof(sw[0])) {
+ switchState = (1 << i);
+ return (1 << i);
+ } else return 0;
}
\ No newline at end of file
