diff options
author | Megan Wachs <megan@sifive.com> | 2016-12-09 17:27:06 -0800 |
---|---|---|
committer | Megan Wachs <megan@sifive.com> | 2016-12-09 17:27:06 -0800 |
commit | a68a562a49da111ff722a1651dd6f74604d3247b (patch) | |
tree | 81fc4b0ef94dfa74c0db3a09d383dded5f9ab53b /bsp | |
parent | c6998b204d3d817a6c2cd0eeb020fd89b09b372e (diff) |
demo_gpio: Make the demo more interesting with interrupts that actually do things.
Diffstat (limited to 'bsp')
-rw-r--r-- | bsp/env/freedom-e300-arty/init.c | 2 | ||||
-rw-r--r-- | bsp/env/hifive1.h | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/bsp/env/freedom-e300-arty/init.c b/bsp/env/freedom-e300-arty/init.c index 4313808..37e9725 100644 --- a/bsp/env/freedom-e300-arty/init.c +++ b/bsp/env/freedom-e300-arty/init.c @@ -44,7 +44,7 @@ uintptr_t handle_trap(uintptr_t mcause, uintptr_t epc) #endif } else { - write(1, "trap\n", 5); + write(1, "Unhandled Trap:\n", 16); _exit(1 + mcause); } return epc; diff --git a/bsp/env/hifive1.h b/bsp/env/hifive1.h index f6bef9f..11b98f8 100644 --- a/bsp/env/hifive1.h +++ b/bsp/env/hifive1.h @@ -66,16 +66,14 @@ #define BUTTON_2_OFFSET 31 #define INT_DEVICE_BUTTON_0 (INT_GPIO_BASE + BUTTON_0_OFFSET) -#define INT_DEVICE_BUTTON_1 (INT_GPIO_BASE + BUTTON_0_OFFSET) -#define INT_DEVICE_BUTTON_2 (INT_GPIO_BASE + BUTTON_0_OFFSET) +#define INT_DEVICE_BUTTON_1 (INT_GPIO_BASE + BUTTON_1_OFFSET) +#define INT_DEVICE_BUTTON_2 (INT_GPIO_BASE + BUTTON_2_OFFSET) #endif #define HAS_HFXOSC 1 #define HAS_LFROSC_BYPASS 1 - - void write_hex(int fd, uint32_t hex); #endif /* _SIFIVE_HIFIVE1_H */ |