Commit 8e781cf8f3e09abf7b9a554e4de170e68bdf175b
authorMichel Pollet <buserror@gmail.com>
Fri, 24 Jul 2015 15:24:22 +0000 (16:24 +0100)
committerMichel Pollet <buserror@gmail.com>
Fri, 24 Jul 2015 15:24:22 +0000 (16: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);