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 #include "mbed.h" 00002 #include "USBMSD_SD.h" 00003 #include "watchdog.h" 00004 00005 Serial pc(USBTX, USBRX); 00006 USBMSD_SD sd(p5, p6, p7, p8, p9, LED1, p14); 00007 DigitalOut myled(LED1); 00008 DigitalOut myled2(LED2); 00009 DigitalOut myled3(LED3); 00010 00011 int main() { 00012 WDTInit(); 00013 while (1) { 00014 if (!sd.disk_present()) { 00015 myled2 = 0; 00016 sd.disconnect(); 00017 NVIC_SystemReset(); 00018 while (!sd.disk_present()) {}; 00019 wait(.5); 00020 } else { 00021 myled2 = 1; 00022 } 00023 if ((LPC_WWDT->MOD >> 2) & 1) { 00024 myled3 = 1; 00025 } 00026 feed(); 00027 } 00028 }
Generated on Wed Jul 13 2022 10:21:28 by
1.7.2