From c78cd2648c7a18b1aa248c7ac61e83e2bfa05f15 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Sun, 2 Jun 2013 14:45:49 +0100 Subject: [PATCH] ioport: Tweak IRQ names Names should include the size in bits, if not 1 Signed-off-by: Michel Pollet --- simavr/sim/avr_ioport.c | 4 ++-- simavr/sim/sim_io.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.39.5