basic: don't crash on bus interrupt

This commit is contained in:
schneider 2011-07-23 21:47:29 +02:00
parent 404b789c04
commit f77bb1f04a
2 changed files with 15 additions and 7 deletions

View File

@ -126,12 +126,7 @@ void rbInit() {
gpioIntEnable(RB_BUSINT);
// add this to catch interrupt:
/*
void PIOINT3_IRQHandler(void) {
if (gpioIntStatus(RB_BUSINT)) {
// do something
gpioIntClear(RB_BUSINT);
}
}
*/
//nrf_init();
@ -139,3 +134,17 @@ void rbInit() {
font=&Font_7x8;
ECIES_setup();
}
#define WEAK_ALIAS(f) __attribute__ ((weak, alias (#f)));
void interrupt_undefined(void) {
}
void businterrupt(void) WEAK_ALIAS(interrupt_undefined);
void PIOINT3_IRQHandler(void) {
if (gpioIntStatus(RB_BUSINT)) {
gpioIntClear(RB_BUSINT);
businterrupt();
}
}

View File

@ -172,5 +172,4 @@ struct MENU {
void handleMenu(const struct MENU *the_menu);
#endif