moved module/hw fields around
[dcpu16] / hw_lem1802.c
index 0c70754e4ecbf45877c8a2e2a7d1c46ab3c09ca6..0b95d1180530d885e533a05b48a8d960d5d8ac0d 100644 (file)
@@ -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_,