From b645f2898598d02f65a590cc61367ff959d2dc7e Mon Sep 17 00:00:00 2001 From: Kelvin Lawson Date: Sat, 31 May 2014 23:45:14 +0100 Subject: [PATCH] dm36x: Support passing interrupt vector to ISRs. --- ports/arm/atomport.h | 2 +- ports/arm/platforms/dm36x/atomport-private.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/arm/atomport.h b/ports/arm/atomport.h index 6198a19..1025b18 100644 --- a/ports/arm/atomport.h +++ b/ports/arm/atomport.h @@ -61,7 +61,7 @@ extern int32_t archUsecDiff (int32_t start_time); /** * ISR handler registration (optional, not available on all ports) */ -typedef void (*ISR_FUNC)(void); +typedef void (*ISR_FUNC)(int int_vector); extern int archIntInstallISR (int int_vector, ISR_FUNC isr_func); extern int archIntEnable (int int_vector, int enable); diff --git a/ports/arm/platforms/dm36x/atomport-private.c b/ports/arm/platforms/dm36x/atomport-private.c index c045f31..e36d068 100644 --- a/ports/arm/platforms/dm36x/atomport-private.c +++ b/ports/arm/platforms/dm36x/atomport-private.c @@ -54,7 +54,7 @@ static ISR_FUNC isr_handlers[DM36X_INTC_MAX_VEC + 1] = NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - atomTimerTick, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + (void *)atomTimerTick, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; @@ -276,7 +276,7 @@ __interrupt_dispatcher (void) atomIntEnter(); /* Call the registered ISR */ - isr_handlers[vector](); + isr_handlers[vector](vector); /* Call the interrupt exit routine */ atomIntExit(TRUE);