git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6515 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
83fa155385
commit
8a162d65ea
|
@ -230,7 +230,7 @@ static uint8_t *otg_do_push(volatile uint32_t *fifop, uint8_t *buf, size_t n) {
|
||||||
while (n > 0) {
|
while (n > 0) {
|
||||||
/* Note, this line relies on the Cortex-M3/M4 ability to perform
|
/* Note, this line relies on the Cortex-M3/M4 ability to perform
|
||||||
unaligned word accesses and on the LSB-first memory organization.*/
|
unaligned word accesses and on the LSB-first memory organization.*/
|
||||||
*fifop = *((uint32_t *)buf);
|
*fifop = *((PACKED_VAR uint32_t *)buf);
|
||||||
buf += 4;
|
buf += 4;
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
|
@ -328,7 +328,7 @@ static uint8_t *otg_do_pop(volatile uint32_t *fifop, uint8_t *buf, size_t n) {
|
||||||
uint32_t w = *fifop;
|
uint32_t w = *fifop;
|
||||||
/* Note, this line relies on the Cortex-M3/M4 ability to perform
|
/* Note, this line relies on the Cortex-M3/M4 ability to perform
|
||||||
unaligned word accesses and on the LSB-first memory organization.*/
|
unaligned word accesses and on the LSB-first memory organization.*/
|
||||||
*((uint32_t *)buf) = w;
|
*((PACKED_VAR uint32_t *)buf) = w;
|
||||||
buf += 4;
|
buf += 4;
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
|
@ -357,7 +357,7 @@ static void otg_fifo_read_to_buffer(volatile uint32_t *fifop,
|
||||||
if (max) {
|
if (max) {
|
||||||
/* Note, this line relies on the Cortex-M3/M4 ability to perform
|
/* Note, this line relies on the Cortex-M3/M4 ability to perform
|
||||||
unaligned word accesses and on the LSB-first memory organization.*/
|
unaligned word accesses and on the LSB-first memory organization.*/
|
||||||
*((uint32_t *)buf) = w;
|
*((PACKED_VAR uint32_t *)buf) = w;
|
||||||
buf += 4;
|
buf += 4;
|
||||||
max--;
|
max--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,11 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||||
#define PORT_THD_FUNCTION(tname, arg) \
|
#define PORT_THD_FUNCTION(tname, arg) \
|
||||||
__attribute__((noreturn)) void tname(void *arg)
|
__attribute__((noreturn)) void tname(void *arg)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Packed variable specifier.
|
||||||
|
*/
|
||||||
|
#define PACKED_VAR __attribute__((packed))
|
||||||
|
|
||||||
#endif /* _NILTYPES_H_ */
|
#endif /* _NILTYPES_H_ */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -101,6 +101,11 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||||
*/
|
*/
|
||||||
#define PORT_THD_FUNCTION(tname, arg) msg_t tname(void *arg)
|
#define PORT_THD_FUNCTION(tname, arg) msg_t tname(void *arg)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Packed variable specifier.
|
||||||
|
*/
|
||||||
|
#define PACKED_VAR __attribute__((packed))
|
||||||
|
|
||||||
#endif /* _CHTYPES_H_ */
|
#endif /* _CHTYPES_H_ */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
Loading…
Reference in New Issue