Fixed bug #434.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6517 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
ff8d0f326c
commit
c86a5d8887
|
@ -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--;
|
||||
}
|
||||
|
|
|
@ -75,6 +75,11 @@ typedef int32_t cnt_t; /**< Resources counter. */
|
|||
*/
|
||||
#define PACK_STRUCT_END
|
||||
|
||||
/**
|
||||
* @brief Packed variable specifier.
|
||||
*/
|
||||
#define PACKED_VAR __attribute__((packed))
|
||||
|
||||
#endif /* _CHTYPES_H_ */
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -74,6 +74,11 @@ typedef int32_t cnt_t; /**< Resources counter. */
|
|||
*/
|
||||
#define PACK_STRUCT_END
|
||||
|
||||
/**
|
||||
* @brief Packed variable specifier.
|
||||
*/
|
||||
#define PACKED_VAR __packed
|
||||
|
||||
#endif /* _CHTYPES_H_ */
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -74,6 +74,11 @@ typedef int32_t cnt_t; /**< Resources counter. */
|
|||
*/
|
||||
#define PACK_STRUCT_END
|
||||
|
||||
/**
|
||||
* @brief Packed variable specifier.
|
||||
*/
|
||||
#define PACKED_VAR __packed
|
||||
|
||||
#endif /* _CHTYPES_H_ */
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
- FIX: Fixed timing issue in the STM32 OTGv1 USB driver (bug #436)(backported
|
||||
to 2.6.2).
|
||||
- FIX: Fixed STM32L1 remove reset flag (bug #435)(backported to 2.6.2).
|
||||
- FIX: Fixed unaligned data access in USB LLD (bug #434)(backported to 2.6.2).
|
||||
- FIX: Fixed add RTC to STM32L1 (bug #433)(backported to 2.6.2).
|
||||
- FIX: Fixed support 10-bit addresses in STM32 I2C driver (bug #432)
|
||||
(backported to 2.6.2).
|
||||
|
|
Loading…
Reference in New Issue