diff options
Diffstat (limited to 'src/stm32l4xx_it.c')
-rw-r--r-- | src/stm32l4xx_it.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stm32l4xx_it.c b/src/stm32l4xx_it.c index 368fed5..d007607 100644 --- a/src/stm32l4xx_it.c +++ b/src/stm32l4xx_it.c @@ -1,28 +1,38 @@ #include <stm32l476xx.h>
+#include <lcd.h>
+
+void perror(const char *s)
+{
+ lcd_puts(s);
+}
void NMI_Handler(void) {}
void HardFault_Handler(void)
{
GPIOA->BSRR |= (1 << 5);
+ perror("Hard Fault!");
while (1);
}
void MemManage_Handler(void)
{
GPIOA->BSRR |= (1 << 5);
+ perror("MemManage Fault!");
while (1);
}
void BusFault_Handler(void)
{
GPIOA->BSRR |= (1 << 5);
+ perror("Bus Fault!");
while (1);
}
void UsageFault_Handler(void)
{
GPIOA->BSRR |= (1 << 5);
+ perror("Usage Fault!");
while (1);
}
|