extint: Add more extints IRQs
authorMichel Pollet <buserror@gmail.com>
Mon, 5 Apr 2010 12:39:06 +0000 (13:39 +0100)
committerMichel Pollet <buserror@gmail.com>
Mon, 5 Apr 2010 12:39:06 +0000 (13:39 +0100)
... and use them on the Mega128 core

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/cores/sim_mega128.c
simavr/sim/avr_extint.h

index 7c53d36..90765f0 100644 (file)
@@ -69,9 +69,14 @@ struct mcu_t {
        AVR_SELFPROG_DECLARE(SPMCSR, SPMEN, SPM_READY_vect),
        AVR_WATCHDOG_DECLARE_128(WDTCR, _VECTOR(0)),
        .extint = {
-               AVR_EXTINT_DECLARE(0, 'D', PD2),
-               AVR_EXTINT_DECLARE(1, 'D', PD3),
-               AVR_EXTINT_DECLARE(2, 'B', PB3),
+               AVR_EXTINT_DECLARE(0, 'D', PD0),
+               AVR_EXTINT_DECLARE(1, 'D', PD1),
+               AVR_EXTINT_DECLARE(2, 'D', PD2),
+               AVR_EXTINT_DECLARE(3, 'D', PD3),
+               AVR_EXTINT_DECLARE(4, 'E', PE4),
+               AVR_EXTINT_DECLARE(5, 'E', PE5),
+               AVR_EXTINT_DECLARE(6, 'E', PE6),
+               AVR_EXTINT_DECLARE(7, 'E', PE7),
        },
        .porta = {  // no PCINTs in atmega128
                .name = 'A', .r_port = PORTA, .r_ddr = DDRA, .r_pin = PINA,
@@ -403,7 +408,7 @@ static avr_t * make()
 }
 
 avr_kind_t mega128 = {
-        .names = { "mega128", "mega128L" },
+        .names = { "atmega128", "atmega128L" },
         .make = make
 };
 
index 8b0f1ba..c44e1e7 100644 (file)
@@ -30,6 +30,8 @@
 enum {
        EXTINT_IRQ_OUT_INT0 = 0,
        EXTINT_IRQ_OUT_INT1, EXTINT_IRQ_OUT_INT2, EXTINT_IRQ_OUT_INT3,
+       EXTINT_IRQ_OUT_INT4, EXTINT_IRQ_OUT_INT5, EXTINT_IRQ_OUT_INT6,
+       EXTINT_IRQ_OUT_INT7,
        EXTINT_COUNT
 };