diff --git a/amex/amex.h b/amex/amex.h index 6e9e7ce..f1a0368 100644 --- a/amex/amex.h +++ b/amex/amex.h @@ -2,8 +2,19 @@ #include -#include "amex/config.h" +#include "amex/ds.h" +#include "amex/eeprom.h" +#include "amex/gpio.h" #include "amex/jvs.h" +#include "amex/sram.h" + +struct amex_config { + struct ds_config ds; + struct eeprom_config eeprom; + struct gpio_config gpio; + struct jvs_config jvs; + struct sram_config sram; +}; HRESULT amex_hook_init( const struct amex_config *cfg, diff --git a/amex/config.c b/amex/config.c index bf41f6f..e138447 100644 --- a/amex/config.c +++ b/amex/config.c @@ -6,7 +6,13 @@ #include #include +#include "amex/amex.h" #include "amex/config.h" +#include "amex/ds.h" +#include "amex/eeprom.h" +#include "amex/gpio.h" +#include "amex/jvs.h" +#include "amex/sram.h" void ds_config_load(struct ds_config *cfg, const wchar_t *filename) { diff --git a/amex/config.h b/amex/config.h index 9c07f6d..d088bf0 100644 --- a/amex/config.h +++ b/amex/config.h @@ -6,40 +6,12 @@ #include #include -struct ds_config { - bool enable; - uint8_t region; - wchar_t serial_no[17]; -}; - -struct eeprom_config { - bool enable; - wchar_t path[MAX_PATH]; -}; - -struct gpio_config { - bool enable; - uint8_t vk_sw1; - uint8_t vk_sw2; - bool dipsw[8]; -}; - -struct jvs_config { - bool enable; -}; - -struct sram_config { - bool enable; - wchar_t path[MAX_PATH]; -}; - -struct amex_config { - struct ds_config ds; - struct eeprom_config eeprom; - struct gpio_config gpio; - struct jvs_config jvs; - struct sram_config sram; -}; +#include "amex/amex.h" +#include "amex/ds.h" +#include "amex/eeprom.h" +#include "amex/gpio.h" +#include "amex/jvs.h" +#include "amex/sram.h" void ds_config_load(struct ds_config *cfg, const wchar_t *filename); void eeprom_config_load(struct eeprom_config *cfg, const wchar_t *filename); diff --git a/amex/ds.c b/amex/ds.c index 15b7d3b..ac3919f 100644 --- a/amex/ds.c +++ b/amex/ds.c @@ -7,7 +7,6 @@ #include #include -#include "amex/config.h" #include "amex/ds.h" #include "amex/nvram.h" diff --git a/amex/ds.h b/amex/ds.h index 7721ffe..0820190 100644 --- a/amex/ds.h +++ b/amex/ds.h @@ -2,7 +2,15 @@ #include -#include "amex/config.h" +#include +#include +#include + +struct ds_config { + bool enable; + uint8_t region; + wchar_t serial_no[17]; +}; DEFINE_GUID( ds_guid, diff --git a/amex/eeprom.c b/amex/eeprom.c index be51693..e051b20 100644 --- a/amex/eeprom.c +++ b/amex/eeprom.c @@ -10,7 +10,6 @@ #include -#include "amex/config.h" #include "amex/eeprom.h" #include "amex/nvram.h" diff --git a/amex/eeprom.h b/amex/eeprom.h index a68dddb..6a73407 100644 --- a/amex/eeprom.h +++ b/amex/eeprom.h @@ -2,7 +2,13 @@ #include -#include "amex/config.h" +#include +#include + +struct eeprom_config { + bool enable; + wchar_t path[MAX_PATH]; +}; DEFINE_GUID( eeprom_guid, diff --git a/amex/gpio.c b/amex/gpio.c index 3e8ac3e..ffd1fc0 100644 --- a/amex/gpio.c +++ b/amex/gpio.c @@ -4,7 +4,6 @@ #include #include -#include "amex/config.h" #include "amex/gpio.h" #include "hook/iohook.h" diff --git a/amex/gpio.h b/amex/gpio.h index b6b5503..110562d 100644 --- a/amex/gpio.h +++ b/amex/gpio.h @@ -2,7 +2,15 @@ #include -#include "amex/config.h" +#include +#include + +struct gpio_config { + bool enable; + uint8_t vk_sw1; + uint8_t vk_sw2; + bool dipsw[8]; +}; DEFINE_GUID( gpio_guid, diff --git a/amex/jvs.c b/amex/jvs.c index 556644f..40d9673 100644 --- a/amex/jvs.c +++ b/amex/jvs.c @@ -8,7 +8,6 @@ #include #include -#include "amex/config.h" #include "amex/jvs.h" #include "hook/iobuf.h" diff --git a/amex/jvs.h b/amex/jvs.h index 569cab7..0bedb0f 100644 --- a/amex/jvs.h +++ b/amex/jvs.h @@ -2,7 +2,7 @@ #include -#include "amex/config.h" +#include #include "jvs/jvs-bus.h" @@ -13,6 +13,10 @@ DEFINE_GUID( 0x4288, 0xAA, 0x00, 0x6C, 0x00, 0xD7, 0x67, 0xBD, 0xBF); +struct jvs_config { + bool enable; +}; + typedef HRESULT (*jvs_provider_t)(struct jvs_node **root); HRESULT jvs_hook_init(const struct jvs_config *cfg, jvs_provider_t provider); diff --git a/amex/sram.c b/amex/sram.c index b961f8f..28fdfa0 100644 --- a/amex/sram.c +++ b/amex/sram.c @@ -10,7 +10,6 @@ #include -#include "amex/config.h" #include "amex/sram.h" #include "amex/nvram.h" diff --git a/amex/sram.h b/amex/sram.h index 0a93aa3..561b2ea 100644 --- a/amex/sram.h +++ b/amex/sram.h @@ -2,7 +2,13 @@ #include -#include "amex/config.h" +#include +#include + +struct sram_config { + bool enable; + wchar_t path[MAX_PATH]; +}; DEFINE_GUID( sram_guid,