AP_HAL: make CANFrame data available as uint32_t

this makes the critical sections in CANFrame handling on STM32 faster
This commit is contained in:
Andrew Tridgell 2022-02-14 09:02:27 +11:00
parent 44d9d410a1
commit 88e7efcf9c

View File

@ -35,7 +35,10 @@ struct AP_HAL::CANFrame {
static const uint8_t MaxDataLen = 8;
uint32_t id; ///< CAN ID with flags (above)
union {
uint8_t data[MaxDataLen];
uint32_t data_32[MaxDataLen/4];
};
uint8_t dlc; ///< Data Length Code
CANFrame() :