diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-04 20:56:51 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-04 20:56:51 +0000 |
commit | 03a0255b043e9a418e96cf3b3e0564ed2f6efe8e (patch) | |
tree | 299c695051e588fb6e7e4f25fc0ad830bc1d7477 /os/hal/platforms/STM32/can_lld.h | |
parent | 980f0b675138676b1e977ca456dc73c3b2502596 (diff) | |
download | ChibiOS-03a0255b043e9a418e96cf3b3e0564ed2f6efe8e.tar.gz ChibiOS-03a0255b043e9a418e96cf3b3e0564ed2f6efe8e.tar.bz2 ChibiOS-03a0255b043e9a418e96cf3b3e0564ed2f6efe8e.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1374 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/can_lld.h')
-rw-r--r-- | os/hal/platforms/STM32/can_lld.h | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/os/hal/platforms/STM32/can_lld.h b/os/hal/platforms/STM32/can_lld.h index f995ffb16..b7dff8ced 100644 --- a/os/hal/platforms/STM32/can_lld.h +++ b/os/hal/platforms/STM32/can_lld.h @@ -97,10 +97,19 @@ typedef uint32_t canstatus_t; * machine data endianness, it can be still useful for a quick filling.
*/
typedef struct {
- uint8_t cf_DLC:4; /**< @brief Data length. */
- uint8_t cf_RTR:1; /**< @brief Frame type. */
- uint8_t cf_IDE:1; /**< @brief Identifier type. */
- uint32_t cf_ID; /**< @brief Frame identifier. */
+ struct {
+ uint8_t cf_DLC:4; /**< @brief Data length. */
+ uint8_t cf_RTR:1; /**< @brief Frame type. */
+ uint8_t cf_IDE:1; /**< @brief Identifier type. */
+ };
+ union {
+ struct {
+ uint32_t cf_SID:11; /**< @brief Standard identifier.*/
+ };
+ struct {
+ uint32_t cf_EID:29; /**< @brief Extended identifier.*/
+ };
+ };
union {
uint8_t cf_data8[8]; /**< @brief Frame data. */
uint16_t cf_data16[4]; /**< @brief Frame data. */
@@ -114,12 +123,23 @@ typedef struct { * machine data endianness, it can be still useful for a quick filling.
*/
typedef struct {
- uint16_t cf_TIME; /**< @brief Time stamp. */
- uint8_t cf_FMI; /**< @brief Filter id. */
- uint8_t cf_DLC:4; /**< @brief Data length. */
- uint8_t cf_RTR:1; /**< @brief Frame type. */
- uint8_t cf_IDE:1; /**< @brief Identifier type. */
- uint32_t cf_ID; /**< @brief Frame identifier. */
+ struct {
+ uint8_t cf_FMI; /**< @brief Filter id. */
+ uint16_t cf_TIME; /**< @brief Time stamp. */
+ };
+ struct {
+ uint8_t cf_DLC:4; /**< @brief Data length. */
+ uint8_t cf_RTR:1; /**< @brief Frame type. */
+ uint8_t cf_IDE:1; /**< @brief Identifier type. */
+ };
+ union {
+ struct {
+ uint32_t cf_SID:11; /**< @brief Standard identifier.*/
+ };
+ struct {
+ uint32_t cf_EID:29; /**< @brief Extended identifier.*/
+ };
+ };
union {
uint8_t cf_data8[8]; /**< @brief Frame data. */
uint16_t cf_data16[4]; /**< @brief Frame data. */
@@ -216,7 +236,8 @@ typedef struct { * until the received frames queue has been completely emptied. It
* is <b>not</b> broadcasted for each received frame. It is
* responsibility of the application to empty the queue by repeatedly
- * invoking @p chReceive() when listening to this event. + * invoking @p chReceive() when listening to this event. This behavior
+ * minimizes the interrupt served by the system because CAN traffic. */
EventSource cd_rxfull_event;
/**
|