From b55240eb43a92c552003b8b324a385e041f84f12 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 1 Dec 2015 02:10:53 +0000 Subject: fish --- host/main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'host/main.c') 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); -- cgit v1.2.3