projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
c78cd26
)
Commit
638d79eece66e44f103b2d3625f5d2927db4b867
author
Michel Pollet
<buserror@gmail.com>
Sun, 2 Jun 2013 13:46:46 +0000
(14:46 +0100)
committer
Michel Pollet
<buserror@gmail.com>
Sun, 2 Jun 2013 13:46:46 +0000
(14:46 +0100)
Set names for the io address IRQ when they are created
Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/sim_io.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/sim_io.c
b/simavr/sim/sim_io.c
index 0f88b9aab63e63e7385088adef457955de8463ae..00c647e3a9d7f1de4a66efe075fcd54387f104bc 100644
(file)
--- a/
simavr/sim/sim_io.c
+++ b/
simavr/sim/sim_io.c
@@
-162,7
+162,22
@@
avr_iomem_getirq(
{
avr_io_addr_t a = AVR_DATA_TO_IO(addr);
if (avr->io[a].irq == NULL) {
- avr->io[a].irq = avr_alloc_irq(&avr->irq_pool, 0, 9, NULL);
+ /*
+ * Prepare an array of names for the io IRQs. Ideally we'd love to have
+ * a proper name for these, but it's not possible at this time.
+ */
+ char names[9 * 20];
+ char * d = names;
+ const char * namep[9];
+ for (int ni = 0; ni < 9; ni++) {
+ if (ni < 8)
+ sprintf(d, "=avr.io%04x.%d", addr, ni);
+ else
+ sprintf(d, "8=avr.io%04x.all", addr);
+ namep[ni] = d;
+ d += strlen(d) + 1;
+ }
+ avr->io[a].irq = avr_alloc_irq(&avr->irq_pool, 0, 9, namep);
// mark the pin ones as filtered, so they only are raised when changing
for (int i = 0; i < 8; i++)
avr->io[a].irq[i].flags |= IRQ_FLAG_FILTERED;