aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-11-30 09:14:06 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-11-30 09:14:06 +0000
commitc86a5d888757ac3c861e0cf6d28671ea97bddc98 (patch)
tree2ffdb95d278caa80748297dec60c513d235072b0 /os/hal
parentff8d0f326cea945049dd084ac0d3599efb9e908d (diff)
downloadChibiOS-c86a5d888757ac3c861e0cf6d28671ea97bddc98.tar.gz
ChibiOS-c86a5d888757ac3c861e0cf6d28671ea97bddc98.tar.bz2
ChibiOS-c86a5d888757ac3c861e0cf6d28671ea97bddc98.zip
Fixed bug #434.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6517 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/STM32/OTGv1/usb_lld.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c
index 4af75ccd2..35b5335e5 100644
--- a/os/hal/platforms/STM32/OTGv1/usb_lld.c
+++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c
@@ -246,7 +246,7 @@ static uint8_t *otg_do_push(volatile uint32_t *fifop, uint8_t *buf, size_t n) {
while (n > 0) {
/* Note, this line relies on the Cortex-M3/M4 ability to perform
unaligned word accesses and on the LSB-first memory organization.*/
- *fifop = *((uint32_t *)buf);
+ *fifop = *((PACKED_VAR uint32_t *)buf);
buf += 4;
n--;
}
@@ -345,7 +345,7 @@ static uint8_t *otg_do_pop(volatile uint32_t *fifop, uint8_t *buf, size_t n) {
uint32_t w = *fifop;
/* Note, this line relies on the Cortex-M3/M4 ability to perform
unaligned word accesses and on the LSB-first memory organization.*/
- *((uint32_t *)buf) = w;
+ *((PACKED_VAR uint32_t *)buf) = w;
buf += 4;
n--;
}
@@ -374,7 +374,7 @@ static void otg_fifo_read_to_buffer(volatile uint32_t *fifop,
if (max) {
/* Note, this line relies on the Cortex-M3/M4 ability to perform
unaligned word accesses and on the LSB-first memory organization.*/
- *((uint32_t *)buf) = w;
+ *((PACKED_VAR uint32_t *)buf) = w;
buf += 4;
max--;
}