X-Git-Url: http://git.squeep.com/?p=dcpu16;a=blobdiff_plain;f=hw_keyboard.c;fp=hw_keyboard.c;h=aaf2f2c88f5a24cd5139517343bd15348d165205;hp=7192efd91f5fe48e042ded1293a452c72e837ffc;hb=33efa05d43acf927c97daab10c00d1cbc2a7b9f6;hpb=d3c579a9b588b7f94fca88474ab2bd010f67a22f diff --git a/hw_keyboard.c b/hw_keyboard.c index 7192efd..aaf2f2c 100644 --- a/hw_keyboard.c +++ b/hw_keyboard.c @@ -232,9 +232,10 @@ int keyboard_data_ctl_(struct dcpu16_hw *hw, const char *cmd, void *data_in, voi return -EINVAL; } -static struct dcpu16_hw hw_ = { - .vm = NULL, + +struct dcpu16_hw_module dcpu16_hw_module_keyboard = { .name_ = "Generic Keyboard (compatible)", + .id_l = 0x7406, .id_h = 0x30cf, .ver = 0x0001, @@ -243,11 +244,7 @@ static struct dcpu16_hw hw_ = { .hwi = keyboard_hwi_, .cycle = keyboard_cycle_, .reset = keyboard_reset_, - .data = (struct keyboard_ *)NULL -}; -struct dcpu16_hw_module dcpu16_hw_module_keyboard = { - .template = &hw_, .data_init = keyboard_data_init_, .data_free = keyboard_data_free_, .ctl = keyboard_data_ctl_,