diff --git a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c index 31e092836..3b70aa8bd 100644 --- a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c +++ b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c @@ -288,8 +288,8 @@ static void usb_packet_write_from_buffer(usbep_t ep, * @notapi */ static void usb_serve_endpoints(USBDriver *usbp, uint32_t istr) { - uint32_t ep = istr & ISTR_EP_ID_MASK; size_t n; + uint32_t ep = istr & ISTR_EP_ID_MASK; uint32_t epr = STM32_USB->EPR[ep]; const USBEndpointConfig *epcp = usbp->epc[ep]; @@ -681,7 +681,7 @@ void usb_lld_disable_endpoints(USBDriver *usbp) { usb_pm_reset(usbp); /* Disabling all endpoints.*/ - for (i = 1; i <= USB_ENDOPOINTS_NUMBER; i++) { + for (i = 1; i <= USB_ENDPOINTS_NUMBER; i++) { EPR_TOGGLE(i, 0); EPR_SET(i, 0); } diff --git a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h index 267b13ba9..99918750a 100644 --- a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h +++ b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h @@ -36,7 +36,7 @@ /** * @brief Maximum endpoint address. */ -#define USB_MAX_ENDPOINTS USB_ENDOPOINTS_NUMBER +#define USB_MAX_ENDPOINTS USB_ENDPOINTS_NUMBER /** * @brief Status stage handling method. diff --git a/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h b/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h index ab5ac71cb..b39f8e8ae 100644 --- a/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h +++ b/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h @@ -31,7 +31,7 @@ * @brief Number of the available endpoints. * @details This value does not include the endpoint 0 which is always present. */ -#define USB_ENDOPOINTS_NUMBER 7 +#define USB_ENDPOINTS_NUMBER 7 /** * @brief Width of USB packet memory accesses. @@ -49,7 +49,7 @@ typedef struct { /** * @brief Endpoint registers. */ - volatile uint32_t EPR[USB_ENDOPOINTS_NUMBER + 1]; + volatile uint32_t EPR[USB_ENDPOINTS_NUMBER + 1]; /* * @brief Reserved space. */