summaryrefslogtreecommitdiff
path: root/usb/device/dfu/dfu_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'usb/device/dfu/dfu_driver.c')
-rw-r--r--usb/device/dfu/dfu_driver.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usb/device/dfu/dfu_driver.c b/usb/device/dfu/dfu_driver.c
index df6fb4f..1e9286e 100644
--- a/usb/device/dfu/dfu_driver.c
+++ b/usb/device/dfu/dfu_driver.c
@@ -22,8 +22,11 @@
#include <unistd.h>
+#include <utility/trace.h>
+
#include <usb/common/core/USBInterfaceDescriptor.h>
#include <usb/common/core/USBGenericDescriptor.h>
+#include <usb/device/core/USBD.h>
#include <usb/common/dfu/usb_dfu.h>
#include <usb/device/dfu/dfu.h>
@@ -66,7 +69,7 @@ static void __dfufunc handle_getstate(void)
}
/* this function gets daisy-chained into processing EP0 requests */
-void USBDFU_DFU_RequestHandler(USBDDriver *pDriver, const USBGenericRequest *request)
+void USBDFU_DFU_RequestHandler(const USBGenericRequest *request)
{
uint8_t req = USBGenericRequest_GetRequest(request);
uint16_t len = USBGenericRequest_GetLength(request);
@@ -76,7 +79,8 @@ void USBDFU_DFU_RequestHandler(USBDDriver *pDriver, const USBGenericRequest *req
/* only process actual DFU specific messages */
if (USBGenericRequest_GetType(request) != USBGenericRequest_CLASS ||
USBGenericRequest_GetRecipient(request) != USBGenericRequest_INTERFACE) {
- USBDDriver_RequestHandler(pDriver, request);
+ TRACE_DEBUG("std_ho_usbd ");
+ USBDDriver_RequestHandler(&usbdDriver, request);
}
switch (dfu.state) {
@@ -299,4 +303,6 @@ out:
void USBDFU_Initialize(const USBDDriverDescriptors *pDescriptors, unsigned char *pInterfaces)
{
USBDDriver_Initialize(&usbdDriver, pDescriptors, pInterfaces);
+
+ USBD_Init();
}
personal git repositories of Harald Welte. Your mileage may vary