From 56146024e19019fb7e0d09ba7d1536980580f094 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 16 Nov 2015 11:12:55 +0000 Subject: [PATCH] Fixed bug #661. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8501 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/LLD/USBv1/stm32_usb.h | 4 +++- readme.txt | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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))) diff --git a/readme.txt b/readme.txt index 6266a2b42..07ff70285 100644 --- a/readme.txt +++ b/readme.txt @@ -141,6 +141,8 @@ (backported to 3.0.3). - HAL: Fixed RTC module loses day of week when converting (bug #664) (backported to 3.0.3). +- HAL: Fixed STM32 USBv1 wrong multiplier when calculating descriptor address + in BTABLE (bug #661)(backported to 3.0.4 and 2.6.10). - HAL: Fixed STM32 USBv1 does not make use of BTABLE_ADDR define (bug #660) (backported to 3.0.4 and 2.6.10). - HAL: Fixed invalid class type for sdPutWouldBlock() and sdGetWouldBlock()