Skip to content

Commit 5715c08

Browse files
committed
irq: Standardized some names
Made all the names more or less standard. Might still change... Signed-off-by: Michel Pollet <[email protected]>
1 parent 19db887 commit 5715c08

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

simavr/sim/sim_interrupts.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ avr_interrupt_init(
3737
avr_int_table_p table = &avr->interrupts;
3838
memset(table, 0, sizeof(*table));
3939

40-
static const char *names[] = { ">global_int_pending", ">global_int_running" };
40+
static const char *names[] = { ">avr.int.pending", ">avr.int.running" };
4141
avr_init_irq(&avr->irq_pool, table->irq,
4242
0, // base number
4343
AVR_INT_IRQ_COUNT, names);
@@ -66,7 +66,10 @@ avr_register_vector(
6666

6767
avr_int_table_p table = &avr->interrupts;
6868

69-
static const char *names[] = { ">int_pending", ">int_running" };
69+
char name0[48], name1[48];
70+
sprintf(name0, ">avr.int.%02x.pending", vector->vector);
71+
sprintf(name1, ">avr.int.%02x.running", vector->vector);
72+
const char *names[2] = { name0, name1 };
7073
avr_init_irq(&avr->irq_pool, vector->irq,
7174
vector->vector * 256, // base number
7275
AVR_INT_IRQ_COUNT, names);

simavr/sim/sim_io.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ avr_iomem_getirq(
184184
const char * namep[9];
185185
for (int ni = 0; ni < 9; ni++) {
186186
if (ni < 8)
187-
sprintf(d, "=avr.io%04x.%d", addr, ni);
187+
sprintf(d, "=avr.io.%04x.%d", addr, ni);
188188
else
189-
sprintf(d, "8=avr.io%04x.all", addr);
189+
sprintf(d, "8=avr.io.%04x.all", addr);
190190
namep[ni] = d;
191191
d += strlen(d) + 1;
192192
}

0 commit comments

Comments
 (0)