mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-24 05:20:10 +01:00
WACCA Console - Touch : Success
This commit is contained in:
parent
c91ef4005a
commit
95192fbee2
@ -319,14 +319,18 @@ static HRESULT touch_handle_get_unit_board_ver(const struct touch_req *req)
|
|||||||
dprintf("Wacca Touch%d: get unit board version\n", req->side);
|
dprintf("Wacca Touch%d: get unit board version\n", req->side);
|
||||||
|
|
||||||
resp.cmd = 0xa8;
|
resp.cmd = 0xa8;
|
||||||
memcpy(resp.version, unit_board_ver, sizeof(unit_board_ver));
|
|
||||||
resp.checksum = 0;
|
|
||||||
resp.checksum = calc_checksum(&resp, sizeof(resp));
|
|
||||||
|
|
||||||
if (req->side == 0) {
|
if (req->side == 0) {
|
||||||
|
memcpy(resp.version, unit_board_ver, sizeof(unit_board_ver));
|
||||||
|
resp.checksum = 0;
|
||||||
|
resp.checksum = calc_checksum(&resp, sizeof(resp));
|
||||||
hr = iobuf_write(&touch0_uart.readable, &resp, sizeof(resp));
|
hr = iobuf_write(&touch0_uart.readable, &resp, sizeof(resp));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
unit_board_ver[6] = 0x4c;
|
||||||
|
memcpy(resp.version, unit_board_ver, sizeof(unit_board_ver));
|
||||||
|
resp.checksum = 0;
|
||||||
|
resp.checksum = calc_checksum(&resp, sizeof(resp));
|
||||||
hr = iobuf_write(&touch1_uart.readable, &resp, sizeof(resp));
|
hr = iobuf_write(&touch1_uart.readable, &resp, sizeof(resp));
|
||||||
}
|
}
|
||||||
return hr;
|
return hr;
|
||||||
@ -419,7 +423,7 @@ static void touch_res_auto_scan(const bool *state)
|
|||||||
frame0.cmd = 0x81;
|
frame0.cmd = 0x81;
|
||||||
frame0.count = input_frame_count_0++;
|
frame0.count = input_frame_count_0++;
|
||||||
input_frame_count_0 %= 0x7f;
|
input_frame_count_0 %= 0x7f;
|
||||||
// for now return no data
|
|
||||||
memcpy(frame0.data1, data, sizeof(data));
|
memcpy(frame0.data1, data, sizeof(data));
|
||||||
memcpy(frame0.data2, data2, sizeof(data2));
|
memcpy(frame0.data2, data2, sizeof(data2));
|
||||||
frame0.checksum = 0;
|
frame0.checksum = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user