summaryrefslogtreecommitdiffstats
path: root/host/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'host/main.c')
-rw-r--r--host/main.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/host/main.c b/host/main.c
index a779cc1..5a61963 100644
--- a/host/main.c
+++ b/host/main.c
@@ -1,4 +1,5 @@
#include "project.h"
+#include "../common/vendor_req.h"
@@ -8,19 +9,21 @@ uint32_t timeout=4000;
char buf[128];
int len;
+
+
len= libusb_control_transfer( devh,
- /* bmRequestType */ LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_INTERFACE,
- /* bRequest */ 0x34,
- /* wValue */ 0x1234,
- /* wIndex */ 0x5678,
+ /* bmRequestType */ LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE,
+ /* bRequest */ VENDOR_REQ_KEYPRESS,
+ /* wValue */ 0x23,
+ /* wIndex */ 0,
/* Data */ buf,
/* wLength */ sizeof(buf), timeout );
-if (len>=0)
-hexdump(">",buf,len);
+//if (len>=0)
+//hexdump(">",buf,len);
}
@@ -87,7 +90,7 @@ int main(int argc,char *argv)
errx(EX_IOERR, "unable to initialize libusb: %i", ret);
- libusb_set_debug(ctx, 255);
+ //libusb_set_debug(ctx, 255);
probe_devices(ctx);