summaryrefslogtreecommitdiffstats
path: root/host/main.c
diff options
context:
space:
mode:
authorroot <root@new-selene.erebei.org>2015-12-01 02:10:53 +0000
committerroot <root@new-selene.erebei.org>2015-12-01 02:10:53 +0000
commitb55240eb43a92c552003b8b324a385e041f84f12 (patch)
treeab932136ecfaa42e1e417e0253aebcc5b5f178aa /host/main.c
parent061430973e82995368d27ff9081391f9475da3c7 (diff)
downloadcandlestick-b55240eb43a92c552003b8b324a385e041f84f12.tar.gz
candlestick-b55240eb43a92c552003b8b324a385e041f84f12.tar.bz2
candlestick-b55240eb43a92c552003b8b324a385e041f84f12.zip
fish
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);