if (clock->interrupt_message) {
if (dcpu16_interrupt(vm, clock->interrupt_message))
- vm->warn_cb_("%s: could not send interrupt", hw->name_);
+ vm->warn_cb_("%s: could not send interrupt", hw->mod->name_);
}
}
}
}
}
-static struct dcpu16_hw hw_ = {
+
+struct dcpu16_hw_module dcpu16_hw_module_clock = {
.name_ = "Generic Clock (compatible)",
+
.id_l = 0xb402,
.id_h = 0x12d0,
.ver = 0x0001,
.hwi = clock_hwi_,
.cycle = clock_cycle_,
.reset = clock_reset_,
- .data = (struct clock_ *)NULL
-};
-struct dcpu16_hw_module dcpu16_hw_module_clock = {
- .template = &hw_,
.data_init = clock_data_init_,
.data_free = clock_data_free_,
.ctl = NULL,