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.
Revision 1:883b8bc1f54a, committed 2011-03-29
- Comitter:
- Kemp
- Date:
- Tue Mar 29 13:47:01 2011 +0000
- Parent:
- 0:786b75c6aaca
- Commit message:
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 29 13:42:16 2011 +0000
+++ b/main.cpp Tue Mar 29 13:47:01 2011 +0000
@@ -2,18 +2,29 @@
Serial pc(USBTX, USBRX);
+BusOut leds(LED1, LED2, LED3, LED4);
extern "C" void HardFault_Handler()
{
pc.printf("Hard fault!\r\n");
- exit(1);
+ while(1) {
+ leds = 0x09;
+ wait(0.4);
+ leds = 0x06;
+ wait(0.4);
+ }
}
void fail()
{
pc.printf("Caught the failure\r\n");
- exit(1);
+ while(1) {
+ leds = 0x09;
+ wait(0.4);
+ leds = 0x06;
+ wait(0.4);
+ }
}