- changed irg-handler prototype: irq-handler now obtain pointer to exception context

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@447 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2009-04-15 14:06:30 +00:00
parent 4452820f09
commit be038f16ba
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -8,7 +8,7 @@
#include "xcpt.h" #include "xcpt.h"
#include "irq.h" #include "irq.h"
static fp_t g_irq_handler[MAX_NUM_IRQ] = {NULL}; static fp_irq_t g_irq_handler[MAX_NUM_IRQ] = {NULL};
int _irq_dispatch(struct xcptcontext * xcp) int _irq_dispatch(struct xcptcontext * xcp)
{ {
@@ -20,7 +20,7 @@ int _irq_dispatch(struct xcptcontext * xcp)
{ {
if (ip & 1) if (ip & 1)
if (g_irq_handler[i]) if (g_irq_handler[i])
(g_irq_handler[i])(); (g_irq_handler[i])(xcp);
ip >>= 1; ip >>= 1;
} }
@@ -28,7 +28,7 @@ int _irq_dispatch(struct xcptcontext * xcp)
return 0; return 0;
} }
void interrupt_register(int irq_num, fp_t fp) void interrupt_register(int irq_num, fp_irq_t fp)
{ {
if ((irq_num >= 0) && (irq_num < MAX_NUM_IRQ)) if ((irq_num >= 0) && (irq_num < MAX_NUM_IRQ))
g_irq_handler[irq_num] = fp; g_irq_handler[irq_num] = fp;
+2 -2
View File
@@ -5,10 +5,10 @@
#define MAX_NUM_IRQ 8 #define MAX_NUM_IRQ 8
typedef void (*fp_t)(void); typedef void (*fp_irq_t)(struct xcptcontext * xcp);
int _irq_dispatch(struct xcptcontext * xcp); int _irq_dispatch(struct xcptcontext * xcp);
void interrupt_register(int irq_num, fp_t fp); void interrupt_register(int irq_num, fp_irq_t fp);
void interrupt_enable(int irq_num); void interrupt_enable(int irq_num);
void interrupt_disable(int irq_num); void interrupt_disable(int irq_num);