X-Git-Url: http://git.squeep.com/?p=dcpu16;a=blobdiff_plain;f=hw_lem1802.c;fp=hw_lem1802.c;h=0b95d1180530d885e533a05b48a8d960d5d8ac0d;hp=0c70754e4ecbf45877c8a2e2a7d1c46ab3c09ca6;hb=33efa05d43acf927c97daab10c00d1cbc2a7b9f6;hpb=d3c579a9b588b7f94fca88474ab2bd010f67a22f diff --git a/hw_lem1802.c b/hw_lem1802.c index 0c70754..0b95d11 100644 --- a/hw_lem1802.c +++ b/hw_lem1802.c @@ -690,8 +690,9 @@ int lem1802_data_ctl_(struct dcpu16_hw *hw, const char *cmd, void *data_in, void } -static struct dcpu16_hw hw_ = { +struct dcpu16_hw_module dcpu16_hw_module_lem1802 = { .name_ = "LEM1802 - Low Energy Monitor", + .id_l = 0xf615, .id_h = 0x7349, .ver = 0x1802, @@ -700,11 +701,7 @@ static struct dcpu16_hw hw_ = { .hwi = lem1802_hwi_, .cycle = lem1802_cycle_, .reset = lem1802_reset_, - .data = (struct lem1802_ *)NULL -}; -struct dcpu16_hw_module dcpu16_hw_module_lem1802 = { - .template = &hw_, .data_init = lem1802_data_init_, .data_free = lem1802_data_free_, .ctl = lem1802_data_ctl_,