diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-01-20 23:15:43 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-01-20 23:15:43 +0000 |
commit | 0a55f2b9c3fcba71f872267bfeb635b8fc4b8cb7 (patch) | |
tree | dd3ae1d19dd72f1e1f0d12019629d59854f52121 /nuttx/include | |
parent | 1a0b77740ae6317e7a9a512489bc74cecb4a5fdf (diff) | |
download | px4-nuttx-0a55f2b9c3fcba71f872267bfeb635b8fc4b8cb7.tar.gz px4-nuttx-0a55f2b9c3fcba71f872267bfeb635b8fc4b8cb7.tar.bz2 px4-nuttx-0a55f2b9c3fcba71f872267bfeb635b8fc4b8cb7.zip |
New, extended CAN structures must be packed.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4320 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/can.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nuttx/include/nuttx/can.h b/nuttx/include/nuttx/can.h index 0ad45ed1e..7fd4bfb15 100644 --- a/nuttx/include/nuttx/can.h +++ b/nuttx/include/nuttx/can.h @@ -41,6 +41,7 @@ ************************************************************************************/ #include <nuttx/config.h> +#include <nuttx/compiler.h> #include <sys/types.h> #include <stdint.h> @@ -162,21 +163,21 @@ struct can_hdr_s uint8_t ch_rtr : 1; /* RTR indication */ uint8_t ch_extid : 1; /* Extended ID indication */ uint8_t ch_unused : 2; /* Unused */ -}; +} packed_struct; #else struct can_hdr_s { uint16_t ch_dlc : 4; /* 4-bit DLC */ uint16_t ch_rtr : 1; /* RTR indication */ uint16_t ch_id : 11; /* 11-bit standard ID */ -}; +} packed_struct; #endif struct can_msg_s { struct can_hdr_s cm_hdr; /* The CAN header */ uint8_t cm_data[CAN_MAXDATALEN]; /* CAN message data (0-8 byte) */ -}; +} packed_struct; /* This structure defines a CAN message FIFO. */ |