Add a name field to the dev_entry struct
This commit is contained in:
parent
b9c432a9b4
commit
d2e21b9f9b
|
@ -59,4 +59,4 @@ void clock_irqh()
|
|||
}
|
||||
}
|
||||
|
||||
struct dev_entry clock_dev = { 0x6d53647c, 0x12d0b402, 0x0000, clock_irqh, clock_init, NULL, clock_tick }; /* Clock device */
|
||||
struct dev_entry clock_dev = { 0x6d53647c, 0x12d0b402, 0x0000, "Clock", clock_irqh, clock_init, NULL, clock_tick }; /* Clock device */
|
||||
|
|
|
@ -59,4 +59,4 @@ void debug_irqh()
|
|||
}
|
||||
}
|
||||
|
||||
struct dev_entry debug_dev = { 0x6d53647c, 0x62e037d3, 0x0000, debug_irqh, NULL, NULL, debug_tick }; /* Debug device */
|
||||
struct dev_entry debug_dev = { 0x6d53647c, 0x62e037d3, 0x0000, "Debugger", debug_irqh, NULL, NULL, debug_tick }; /* Debug device */
|
||||
|
|
|
@ -373,5 +373,5 @@ void keyboard_irqh()
|
|||
}
|
||||
}
|
||||
|
||||
struct dev_entry lem1802_dev = { 0x1c6c8b36, 0x7349f615, 0x1802, lem1802_irqh, lem1802_init, lem1802_free, lem1802_tick }; /* LEM1802 */
|
||||
struct dev_entry keyboard_dev = { 0x6d53647c, 0x30cf7406, 1, keyboard_irqh, keyboard_init, NULL, NULL }; /* Generic keyboard */
|
||||
struct dev_entry lem1802_dev = { 0x1c6c8b36, 0x7349f615, 0x1802, "LEM1802 (SDL)", lem1802_irqh, lem1802_init, lem1802_free, lem1802_tick }; /* LEM1802 */
|
||||
struct dev_entry keyboard_dev = { 0x6d53647c, 0x30cf7406, 1, "Keyboard (SDL)", keyboard_irqh, keyboard_init, NULL, NULL }; /* Generic keyboard */
|
||||
|
|
1
device.h
1
device.h
|
@ -8,6 +8,7 @@ struct dev_entry {
|
|||
uint32_t vendor;
|
||||
uint32_t product;
|
||||
uint16_t version;
|
||||
char *name;
|
||||
void (*irqh)();
|
||||
void (*init)();
|
||||
void (*free)();
|
||||
|
|
6
dsim.c
6
dsim.c
|
@ -68,9 +68,13 @@ void reset()
|
|||
trace = false;
|
||||
running = true;
|
||||
|
||||
for (hwn = 0; iodevs[hwn] != NULL; hwn++)
|
||||
for (hwn = 0; iodevs[hwn] != NULL; hwn++) {
|
||||
printf("HWI %d: V:%08x P:%08x R:%04x %s\n",
|
||||
hwn, iodevs[hwn]->vendor, iodevs[hwn]->product,
|
||||
iodevs[hwn]->version, iodevs[hwn]->name);
|
||||
if (iodevs[hwn]->init)
|
||||
iodevs[hwn]->init();
|
||||
}
|
||||
|
||||
printf("Initialized %d devices\n", hwn);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue