aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/util.c
diff options
context:
space:
mode:
authoriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2010-03-11 05:17:46 +0000
committeriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2010-03-11 05:17:46 +0000
commit64444756ecd2d9127529ae19a17cfbfa58f1cc69 (patch)
treef74bab47aa7dfc2c1609476087f479e3ae1ef3a8 /src/lib/util.c
parent966e4ac594494f02a62d34bb9446ce1ff07dc54b (diff)
downloadlibrambutan-64444756ecd2d9127529ae19a17cfbfa58f1cc69.tar.gz
librambutan-64444756ecd2d9127529ae19a17cfbfa58f1cc69.zip
turn usb interrupts on after failed assert so bootloader still works
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@147 749a229e-a60e-11de-b98f-4500b42dc123
Diffstat (limited to 'src/lib/util.c')
-rw-r--r--src/lib/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/util.c b/src/lib/util.c
index c75031f..d323611 100644
--- a/src/lib/util.c
+++ b/src/lib/util.c
@@ -75,6 +75,10 @@ void _fail(const char* file, int line, const char* exp) {
/* Turn on the error LED */
gpio_set_mode(ERROR_LED_PORT, ERROR_LED_PIN, GPIO_MODE_OUTPUT_PP);
+ /* Turn the USB interrupt back on so the bootloader keeps on functioning */
+ nvic_enable_interrupt(NVIC_INT_USBHP);
+ nvic_enable_interrupt(NVIC_INT_USBLP);
+
/* Error fade */
while (1) {
if (CC == TOP_CNT) {