summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-06-16 18:01:04 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-06-16 18:01:04 +0000
commit8937ece83f3e3317a84214028ec81b1fc042a040 (patch)
tree9970a13ad658e317695bb311c2e4ed8c55d99f59 /tools
parentf31fbabd2aa6a30523afb53396d039f4b8a6de1b (diff)
Fix direction bit for clear status and abort commands
Diffstat (limited to 'tools')
-rw-r--r--tools/dfu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/dfu.c b/tools/dfu.c
index 08e256b9..b46027a0 100644
--- a/tools/dfu.c
+++ b/tools/dfu.c
@@ -146,7 +146,7 @@ int dfu_clear_status(struct usb_dev_handle *udev, int intf)
if (!udev)
return -EIO;
- return usb_control_msg(udev, USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE,
+ return usb_control_msg(udev, USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE,
DFU_CLRSTATUS, 0, intf, NULL, 0, DFU_TIMEOUT);
}
@@ -164,6 +164,6 @@ int dfu_abort(struct usb_dev_handle *udev, int intf)
if (!udev)
return -EIO;
- return usb_control_msg(udev, USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE,
+ return usb_control_msg(udev, USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE,
DFU_ABORT, 0, intf, NULL, 0, DFU_TIMEOUT);
}