From fed8081d45d05ecf2b557515e17a5005b90a7e96 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 23 Mar 2022 18:39:27 +0200 Subject: test open/close --- hid-tmt248.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'hid-tmt248.c') diff --git a/hid-tmt248.c b/hid-tmt248.c index 2881ffc..f3d4700 100644 --- a/hid-tmt248.c +++ b/hid-tmt248.c @@ -243,7 +243,14 @@ static int t248_open(void *data) if (!t248) return -ENODEV; - /* TODO: send usb commands to actually open device */ + t248->send_buffer[0] = 0x01; + t248->send_buffer[1] = 0x04; + t300rs_send_int(t248); + + t248->send_buffer[0] = 0x01; + t248->send_buffer[1] = 0x05; + t300rs_send_int(t248); + return t248->open(t248->input_dev); } @@ -253,7 +260,14 @@ static int t248_close(void *data) if (!t248) return -ENODEV; - /* TODO: send usb commands to actually close device */ + t248->send_buffer[0] = 0x01; + t248->send_buffer[1] = 0x05; + t300rs_send_int(t248); + + t248->send_buffer[0] = 0x01; + t248->send_buffer[1] = 0x00; + t300rs_send_int(t248); + t248->close(t248->input_dev); return 0; } -- cgit v1.3