ioport: Tweak IRQ names
authorMichel Pollet <buserror@gmail.com>
Sun, 2 Jun 2013 13:45:49 +0000 (14:45 +0100)
committerMichel Pollet <buserror@gmail.com>
Sun, 2 Jun 2013 13:45:49 +0000 (14:45 +0100)
Names should include the size in bits, if not 1

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/avr_ioport.c
simavr/sim/sim_io.c

index 24a8a9b..b787d2c 100644 (file)
@@ -172,8 +172,8 @@ static const char * irq_names[IOPORT_IRQ_COUNT] = {
        [IOPORT_IRQ_PIN5] = "=pin5",
        [IOPORT_IRQ_PIN6] = "=pin6",
        [IOPORT_IRQ_PIN7] = "=pin7",
-       [IOPORT_IRQ_PIN_ALL] = "=all",
-       [IOPORT_IRQ_DIRECTION_ALL] = ">ddr",
+       [IOPORT_IRQ_PIN_ALL] = "8=all",
+       [IOPORT_IRQ_DIRECTION_ALL] = "8>ddr",
 };
 
 static avr_io_t        _io = {
index e2f4f62..0f88b9a 100644 (file)
@@ -196,6 +196,8 @@ avr_io_setirqs(
                                char * dst = buf;
                                // copy the 'flags' of the name out
                                const char * kind = io->irq_names[i];
+                               while (isdigit(*kind))
+                                       *dst++ = *kind++;
                                while (!isalpha(*kind))
                                        *dst++ = *kind++;
                                // add avr name