From: Michel Pollet Date: Sun, 2 Jun 2013 13:45:49 +0000 (+0100) Subject: ioport: Tweak IRQ names X-Git-Tag: v1.1~20 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=c78cd2648c7a18b1aa248c7ac61e83e2bfa05f15;p=sx%2Fsimavr.git ioport: Tweak IRQ names Names should include the size in bits, if not 1 Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/avr_ioport.c b/simavr/sim/avr_ioport.c index 24a8a9b..b787d2c 100644 --- a/simavr/sim/avr_ioport.c +++ b/simavr/sim/avr_ioport.c @@ -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 = { diff --git a/simavr/sim/sim_io.c b/simavr/sim/sim_io.c index e2f4f62..0f88b9a 100644 --- a/simavr/sim/sim_io.c +++ b/simavr/sim/sim_io.c @@ -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