diff options
author | Perry Hung <iperry@gmail.com> | 2010-09-17 03:49:14 -0400 |
---|---|---|
committer | Perry Hung <iperry@gmail.com> | 2010-09-17 03:49:14 -0400 |
commit | 2e79aafb7081a5305ee875277d26734779ca6d2f (patch) | |
tree | 9ae02b8733ecd75f9e783a81cd7d46fa7e505b9a /libmaple/util.h | |
parent | bdb85a454917a6e875c77ae12f9fd67961aebfae (diff) | |
download | librambutan-2e79aafb7081a5305ee875277d26734779ca6d2f.tar.gz librambutan-2e79aafb7081a5305ee875277d26734779ca6d2f.zip |
Enable USB auto-reset in a hard fault.
Redirect thread-mode execution to a fail routine which throbs the LED to
indicate a hard fault. Because the fail routine runs in thread mode
with interrupts on, USB auto-reset should now work. Test by executing
some bogus instruction (e.g. *(volatile int*)0xf34fdaa = 0;) and check
that the auto-reset continues to work.
Diffstat (limited to 'libmaple/util.h')
-rw-r--r-- | libmaple/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libmaple/util.h b/libmaple/util.h index 63e305d..be5e430 100644 --- a/libmaple/util.h +++ b/libmaple/util.h @@ -66,6 +66,7 @@ extern "C"{ #endif void _fail(const char*, int, const char*); +void throb(void); #ifdef __cplusplus } // extern "C" |