diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-12-30 18:13:22 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-12-30 18:13:22 +0000 |
commit | 3eb484bd4d79de731b743d9dccf9a2535b82699f (patch) | |
tree | d1294e332ccb95febfb82745a73d1cfcb29366bd /nuttx/configs/z80sim/src/z80_irq.c | |
parent | c5ba5065cbf2b43101f4c311f56d55a0ff99bad6 (diff) | |
download | px4-nuttx-3eb484bd4d79de731b743d9dccf9a2535b82699f.tar.gz px4-nuttx-3eb484bd4d79de731b743d9dccf9a2535b82699f.tar.bz2 px4-nuttx-3eb484bd4d79de731b743d9dccf9a2535b82699f.zip |
Integrating z80
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@463 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/z80sim/src/z80_irq.c')
-rw-r--r-- | nuttx/configs/z80sim/src/z80_irq.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/nuttx/configs/z80sim/src/z80_irq.c b/nuttx/configs/z80sim/src/z80_irq.c index b6e81b32e..5fd150359 100644 --- a/nuttx/configs/z80sim/src/z80_irq.c +++ b/nuttx/configs/z80sim/src/z80_irq.c @@ -76,10 +76,21 @@ void up_irqinitialize(void) current_regs = NULL; - /* And finally, enable interrupts */ + /* Attach the timer interrupt -- There is not special timer interrupt + * enable in the simulation so it must be enabled here before interrupts + * are enabled. + * + * NOTE: Normally, there are seperate enables for "global" interrupts + * and specific device interrupts. In such a "normal" case, the timer + * interrupt should be attached and enabled in the the function up_timerinit() + */ + + irq_attach(Z80_IRQ_SYSTIMER, (xcpt_t)up_timerisr); + + /* And finally, enable interrupts (including the timer) */ #ifndef CONFIG_SUPPRESS_INTERRUPTS - irqrestore(TRUE); + irqrestore(Z80_C_FLAG); #endif } @@ -93,7 +104,7 @@ void up_irqinitialize(void) void up_disable_irq(int irq) { - irqrestore(FALSE); + irqrestore(0); } /**************************************************************************** |