Commit b03078d9a2d8a598c608afff677146bb91925d22
authorMichel Pollet <buserror@gmail.com>
Fri, 24 Jul 2015 15:24:22 +0000 (16:24 +0100)
committerMichel Pollet <buserror@gmail.com>
Fri, 2 Oct 2015 06:24:03 +0000 (07:24 +0100)
Still register portA, regardless of PORTA constant initialisation

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/cores/sim_megax.c

index 717bc7e40b76b21ab2388d0799c71087e8edc28d..c9077fa067f1770022111a877eefc9eb5229cfc1 100644 (file)
@@ -32,9 +32,8 @@ void mx_init(struct avr_t * avr)
        avr_flash_init(avr, &mcu->selfprog);
        avr_watchdog_init(avr, &mcu->watchdog);
        avr_extint_init(avr, &mcu->extint);
-#ifdef PORTA
+       // we try to initialize this one, in case it's declared
        avr_ioport_init(avr, &mcu->porta);
-#endif
        avr_ioport_init(avr, &mcu->portb);
        avr_ioport_init(avr, &mcu->portc);
        avr_ioport_init(avr, &mcu->portd);