aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src/usb.c')
-rw-r--r--os/hal/src/usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c
index 745b2d436..1da532abf 100644
--- a/os/hal/src/usb.c
+++ b/os/hal/src/usb.c
@@ -238,10 +238,14 @@ void usbInit(void) {
* @init
*/
void usbObjectInit(USBDriver *usbp) {
+ unsigned i;
usbp->state = USB_STOP;
usbp->config = NULL;
- usbp->param = NULL;
+ for (i = 0; i < USB_MAX_ENDPOINTS; i++) {
+ usbp->in_params[i] = NULL;
+ usbp->out_params[i] = NULL;
+ }
usbp->transmitting = 0;
usbp->receiving = 0;
}