From 9f2dca3e4e2c2aa042f6b94cc1fe308bc1e22bc0 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sat, 6 Jul 2013 17:01:12 -0400 Subject: [PATCH] usb_standard_request: Always call configuration_changed_cb For reasons I don't entirely understand, bulk requests are suddenly ignored after a SET_CONFIGURATION request (even if the configuration did not change) unless the endpoints are reinitialized. This is done by configuration_changed_cb, therefore we call it for every request. --- firmware/hackrf_usb/usb_standard_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/hackrf_usb/usb_standard_request.c b/firmware/hackrf_usb/usb_standard_request.c index 43f2379f..43c23ada 100644 --- a/firmware/hackrf_usb/usb_standard_request.c +++ b/firmware/hackrf_usb/usb_standard_request.c @@ -100,9 +100,11 @@ bool usb_set_configuration( if( new_configuration != device->configuration ) { // Configuration changed. device->configuration = new_configuration; - if (usb_configuration_changed_cb) - usb_configuration_changed_cb(device); } + + if (usb_configuration_changed_cb) + usb_configuration_changed_cb(device); + return true; }