forked from TeamTofuShop/segatools
Wire up libamex config
This commit is contained in:
44
amex/amex.c
44
amex/amex.c
@ -1,3 +1,5 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include "amex/amex.h"
|
||||
#include "amex/ds.h"
|
||||
#include "amex/eeprom.h"
|
||||
@ -5,11 +7,41 @@
|
||||
#include "amex/jvs.h"
|
||||
#include "amex/sram.h"
|
||||
|
||||
void amex_hook_init(void)
|
||||
HRESULT amex_hook_init(const struct amex_config *cfg)
|
||||
{
|
||||
ds_hook_init();
|
||||
eeprom_hook_init();
|
||||
gpio_hook_init();
|
||||
jvs_hook_init();
|
||||
sram_hook_init();
|
||||
HRESULT hr;
|
||||
|
||||
assert(cfg != NULL);
|
||||
|
||||
hr = ds_hook_init(&cfg->ds);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = eeprom_hook_init(&cfg->eeprom);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = gpio_hook_init(&cfg->gpio);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = jvs_hook_init(&cfg->jvs);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = sram_hook_init(&cfg->sram);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user