forked from TeamTofuShop/segatools
mai2: update all LED boards to use two boards
This commit is contained in:
@ -23,7 +23,8 @@ void led15070_config_load(struct led15070_config *cfg, const wchar_t *filename)
|
||||
wchar_t tmpstr[16];
|
||||
|
||||
cfg->enable = GetPrivateProfileIntW(L"led15070", L"enable", 1, filename);
|
||||
cfg->port_no = GetPrivateProfileIntW(L"led15070", L"portNo", 0, filename);
|
||||
cfg->port_no[0] = GetPrivateProfileIntW(L"led15070", L"portNo1", 0, filename);
|
||||
cfg->port_no[1] = GetPrivateProfileIntW(L"led15070", L"portNo2", 0, filename);
|
||||
cfg->fw_ver = GetPrivateProfileIntW(L"led15070", L"fwVer", 0x90, filename);
|
||||
/* TODO: Unknown, no firmware file available */
|
||||
cfg->fw_sum = GetPrivateProfileIntW(L"led15070", L"fwSum", 0xdead, filename);
|
||||
|
@ -100,8 +100,9 @@ static DWORD CALLBACK swdc_pre_startup(void)
|
||||
}
|
||||
|
||||
/* Not working, different board -04 instead of -02? */
|
||||
unsigned int led_port_no[2] = {2, 0};
|
||||
hr = led15070_hook_init(&swdc_hook_cfg.led15070, swdc_dll.led_init,
|
||||
swdc_dll.led_set_fet_output, NULL, swdc_dll.led_gs_update, 2, 1);
|
||||
swdc_dll.led_set_fet_output, NULL, swdc_dll.led_gs_update, led_port_no);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
goto fail;
|
||||
|
@ -203,7 +203,7 @@ static HRESULT swdc_io4_write_gpio(uint8_t* payload, size_t len)
|
||||
lights_data & SWDC_IO_LED_LEFT ? 0xFF : 0x00,
|
||||
};
|
||||
|
||||
swdc_dll.led_set_leds(rgb_out);
|
||||
swdc_dll.led_set_leds(0, rgb_out);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -11,9 +11,9 @@ struct swdc_dll {
|
||||
void (*get_gamebtns)(uint16_t *gamebtn);
|
||||
void (*get_analogs)(struct swdc_io_analog_state *out);
|
||||
HRESULT (*led_init)(void);
|
||||
void (*led_set_fet_output)(const uint8_t *rgb);
|
||||
void (*led_gs_update)(const uint8_t *rgb);
|
||||
void (*led_set_leds)(const uint8_t *rgb);
|
||||
void (*led_set_fet_output)(uint8_t board, const uint8_t *rgb);
|
||||
void (*led_gs_update)(uint8_t board, const uint8_t *rgb);
|
||||
void (*led_set_leds)(uint8_t board, const uint8_t *rgb);
|
||||
HRESULT (*ffb_init)(void);
|
||||
void (*ffb_toggle)(bool active);
|
||||
void (*ffb_constant_force)(uint8_t direction, uint8_t force);
|
||||
|
Reference in New Issue
Block a user