From 52f82fb9cc13779146016ca993c80f7b82ea65bd Mon Sep 17 00:00:00 2001 From: barthess Date: Wed, 4 Jan 2017 10:17:04 +0300 Subject: [PATCH] USB MSD. Cosmetical improvements. --- os/hal/include/hal_usb_msd.h | 1 - os/hal/src/hal_usb_msd.c | 1 + testhal/STM32/STM32F7xx/USB_MSD/usbcfg.c | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/os/hal/include/hal_usb_msd.h b/os/hal/include/hal_usb_msd.h index b9e5c463..fcc2cf28 100644 --- a/os/hal/include/hal_usb_msd.h +++ b/os/hal/include/hal_usb_msd.h @@ -34,7 +34,6 @@ /*===========================================================================*/ #define USB_MSD_DATA_EP 0x01 -#define USB_MSD_EP_SIZE 0x40 /*===========================================================================*/ /* Driver pre-compile time settings. */ diff --git a/os/hal/src/hal_usb_msd.c b/os/hal/src/hal_usb_msd.c index 068d6980..6cc53865 100644 --- a/os/hal/src/hal_usb_msd.c +++ b/os/hal/src/hal_usb_msd.c @@ -214,6 +214,7 @@ static void send_csw(USBMassStorageDriver *msdp, uint8_t status, */ static THD_FUNCTION(usb_msd_worker, arg) { USBMassStorageDriver *msdp = arg; + chRegSetThreadName("usb_msd_worker"); while(! chThdShouldTerminateX()) { const msg_t status = usbReceive(msdp->usbp, USB_MSD_DATA_EP, diff --git a/testhal/STM32/STM32F7xx/USB_MSD/usbcfg.c b/testhal/STM32/STM32F7xx/USB_MSD/usbcfg.c index 4efeb4b0..22a20296 100644 --- a/testhal/STM32/STM32F7xx/USB_MSD/usbcfg.c +++ b/testhal/STM32/STM32F7xx/USB_MSD/usbcfg.c @@ -20,6 +20,11 @@ #include "hal_usb_msd.h" #include "usbcfg.h" +/* + * must be 64 for full speed and 512 for high speed + */ +#define USB_MSD_EP_SIZE 64U + /* * USB Device Descriptor. */