From 7281ca62c4c1b56f134b39e610efc2cd3d88cbae Mon Sep 17 00:00:00 2001
From: Marius Greuel <greuelm@mgtek.com>
Date: Sun, 23 Feb 2020 21:03:11 +0200
Subject: [PATCH] Correct endpoint direction for control messages of USBtinyISP
 devices

---
 usbtiny.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usbtiny.c b/usbtiny.c
index 0994bd36..5b5eda27 100644
--- a/usbtiny.c
+++ b/usbtiny.c
@@ -106,7 +106,7 @@ static int usb_control (PROGRAMMER * pgm,
 {
   int nbytes;
   nbytes = usb_control_msg( PDATA(pgm)->usb_handle,
-			    USB_ENDPOINT_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+			    USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
 			    requestid,
 			    val, index,           // 2 bytes each of data
 			    NULL, 0,              // no data buffer in control messge