From: Michel Pollet Date: Tue, 15 Aug 2017 11:26:34 +0000 (+0100) Subject: irq: Standardized some names X-Git-Tag: v1.6~24 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=5715c08885117336df0530b260b0e577cc00284e;p=sx%2Fsimavr.git irq: Standardized some names Made all the names more or less standard. Might still change... Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/sim_interrupts.c b/simavr/sim/sim_interrupts.c index ab5fd9f..b689a94 100644 --- a/simavr/sim/sim_interrupts.c +++ b/simavr/sim/sim_interrupts.c @@ -37,7 +37,7 @@ avr_interrupt_init( avr_int_table_p table = &avr->interrupts; memset(table, 0, sizeof(*table)); - static const char *names[] = { ">global_int_pending", ">global_int_running" }; + static const char *names[] = { ">avr.int.pending", ">avr.int.running" }; avr_init_irq(&avr->irq_pool, table->irq, 0, // base number AVR_INT_IRQ_COUNT, names); @@ -66,7 +66,10 @@ avr_register_vector( avr_int_table_p table = &avr->interrupts; - static const char *names[] = { ">int_pending", ">int_running" }; + char name0[48], name1[48]; + sprintf(name0, ">avr.int.%02x.pending", vector->vector); + sprintf(name1, ">avr.int.%02x.running", vector->vector); + const char *names[2] = { name0, name1 }; avr_init_irq(&avr->irq_pool, vector->irq, vector->vector * 256, // base number AVR_INT_IRQ_COUNT, names); diff --git a/simavr/sim/sim_io.c b/simavr/sim/sim_io.c index 0ef0be8..548f030 100644 --- a/simavr/sim/sim_io.c +++ b/simavr/sim/sim_io.c @@ -184,9 +184,9 @@ avr_iomem_getirq( const char * namep[9]; for (int ni = 0; ni < 9; ni++) { if (ni < 8) - sprintf(d, "=avr.io%04x.%d", addr, ni); + sprintf(d, "=avr.io.%04x.%d", addr, ni); else - sprintf(d, "8=avr.io%04x.all", addr); + sprintf(d, "8=avr.io.%04x.all", addr); namep[ni] = d; d += strlen(d) + 1; }