diff options
Diffstat (limited to 'nuttx/arch/z80/include/z8/irq.h')
-rw-r--r-- | nuttx/arch/z80/include/z8/irq.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/nuttx/arch/z80/include/z8/irq.h b/nuttx/arch/z80/include/z8/irq.h index fec1da0bf..b994635be 100644 --- a/nuttx/arch/z80/include/z8/irq.h +++ b/nuttx/arch/z80/include/z8/irq.h @@ -72,7 +72,7 @@ # endif #endif -/* ez8 Interrupt Numbers */ +/* ez8 Interrupt Numbers ****************************************************/ #if defined(ENCORE_VECTORS) @@ -198,7 +198,31 @@ #define Z8_IRQ_SYSTIMER Z8_TIMER0_IRQ -/* IRQ State Save Formatt +/* IRQ Management Macros ****************************************************/ + +/* These macros map IRQ numbers to IRQ registers and bits. + * WARNING: These have only been verified for the Z8F640X family! + */ + +#if defined(_Z8ENCORE_F640X) || defined(_Z8ENCORE_640_FAMILY) + +# define Z8_IRQ0_MIN Z8_TIMER2_IRQ +# define Z8_IRQ0_BIT(irq) (Z8_ADC_IRQ - (irq)) +# define Z8_IRQ0_MAX Z8_ADC_IRQ + +# define Z8_IRQ1_MIN Z8_P7AD_IRQ +# define Z8_IRQ1_BIT(irq) (Z8_P0AD_IRQ - (irq)) +# define Z8_IRQ1_MAX Z8_P0AD_IRQ + +# define Z8_IRQ2_MIN Z8_TIMER3_IRQ +# define Z8_IRQ3_BIT(irq) (Z8_C0_IRQ - (irq)) +# define Z8_IRQ2_MAX Z8_C0_IRQ + +#else +# error "Add IRQ support for Z8F family" +#endif + +/* IRQ State Save Format **************************************************** * * These indices describe how the ez8 context is save in the state save array * |