aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/STM32/LLD/USBv1/stm32_usb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h b/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h
index 8e47136f1..9acf0686f 100644
--- a/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h
+++ b/os/hal/ports/STM32/LLD/USBv1/stm32_usb.h
@@ -112,6 +112,8 @@ typedef struct {
* @name Register aliases
* @{
*/
+#define RXCOUNT1 TXCOUNT0
+#define TXCOUNT1 RXCOUNT0
#define RXADDR1 TXADDR0
#define TXADDR1 RXADDR0
/** @} */
@@ -247,7 +249,7 @@ typedef struct {
*/
#define USB_GET_DESCRIPTOR(ep) \
((stm32_usb_descriptor_t *)((uint32_t)STM32_USBRAM_BASE + \
- (uint32_t)STM32_USB->BTABLE * 2 + \
+ (uint32_t)STM32_USB->BTABLE + \
(uint32_t)(ep) * \
sizeof(stm32_usb_descriptor_t)))