aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/USBv1
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-10-30 09:16:59 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-10-30 09:16:59 +0000
commitf0421aa779bab235a6298b6bd6535956884965ab (patch)
tree4e8cad310620b8583124d87668d5acc83a0d6f78 /os/hal/ports/STM32/LLD/USBv1
parent8d1bc9441d7122f442803bfbdc675b6de48d8d25 (diff)
downloadChibiOS-f0421aa779bab235a6298b6bd6535956884965ab.tar.gz
ChibiOS-f0421aa779bab235a6298b6bd6535956884965ab.tar.bz2
ChibiOS-f0421aa779bab235a6298b6bd6535956884965ab.zip
Fixed bug #656.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8406 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/USBv1')
-rw-r--r--os/hal/ports/STM32/LLD/USBv1/usb_lld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/USBv1/usb_lld.c b/os/hal/ports/STM32/LLD/USBv1/usb_lld.c
index c6ccc16da..3a97e123a 100644
--- a/os/hal/ports/STM32/LLD/USBv1/usb_lld.c
+++ b/os/hal/ports/STM32/LLD/USBv1/usb_lld.c
@@ -110,7 +110,7 @@ static uint32_t usb_pm_alloc(USBDriver *usbp, size_t size) {
uint32_t next;
next = usbp->pmnext;
- usbp->pmnext += size;
+ usbp->pmnext += (size + 1) & ~1;
osalDbgAssert(usbp->pmnext <= STM32_USB_PMA_SIZE, "PMA overflow");
return next;
}