Commit c78cd2648c7a18b1aa248c7ac61e83e2bfa05f15
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>
2 files changed:
simavr/sim/avr_ioport.c
simavr/sim/sim_io.c

index 24a8a9bd5d6b43497e021304389edc652ad06676..b787d2c68c402b0a0338d0e9c4a9495370425881 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 e2f4f62567134da5c7d9bf7a7b275e96ecc8d99a..0f88b9aab63e63e7385088adef457955de8463ae 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