Commit 5715c08885117336df0530b260b0e577cc00284e
authorMichel Pollet <buserror@gmail.com>
Tue, 15 Aug 2017 11:26:34 +0000 (12:26 +0100)
committerMichel Pollet <buserror@gmail.com>
Fri, 18 Aug 2017 10:33:52 +0000 (11:33 +0100)
Made all the names more or less standard. Might still change...

Signed-off-by: Michel Pollet <buserror@gmail.com>
2 files changed:
simavr/sim/sim_interrupts.c
simavr/sim/sim_io.c

index ab5fd9f94397acb32f6b21e9da456a0ec8f02892..b689a94ea9ef75797f7bb91497bf1587ccef84f4 100644 (file)
@@ -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);
index 0ef0be8238b43456f4f4603a0745c20166e6fdad..548f0306113681d2281db23102da0a344f920f5e 100644 (file)
@@ -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;
                }