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.
main.cpp
00001 /** A demo program for DebounceIn 00002 * Takuo WATANABE 00003 * http://mbed.org/users/takuo/code/DebounceIn/ 00004 */ 00005 00006 #include "mbed.h" 00007 #include "DebounceIn.h" 00008 00009 int nrise = 0, nfall = 0; 00010 void rise() { nrise++; } 00011 void fall() { nfall++; } 00012 00013 int main() { 00014 DebounceIn button(p14); 00015 button.rise(rise); 00016 button.fall(fall); 00017 while (true) { 00018 printf("nrise=%d, nfall=%d\n", nrise, nfall); 00019 wait(1); 00020 } 00021 }
Generated on Tue Jul 19 2022 03:59:26 by
1.7.2