Closed pioneerAlone closed 11 months ago
Since I'm using a resource-deficient MCU (ram: 20K), and I only use classic can,
So for the payload_buffer size in the structure Txitem, I can use CANARD_MTU_CAN_CLASSIC.
`define CANARD_MTU_CAN_CLASSIC 8U
typedef struct TxItem { CanardTxQueueItem base; uint8_t payload_buffer[CANARD_MTU_MAX]; } TxItem; `
The payload_buffer field here is a flex array member; the declared size has no influence on its memory footprint.
payload_buffer
Thanks for comments,
Sure, got it.
Since I'm using a resource-deficient MCU (ram: 20K), and I only use classic can,
So for the payload_buffer size in the structure Txitem, I can use CANARD_MTU_CAN_CLASSIC.
`define CANARD_MTU_CAN_CLASSIC 8U
define CANARD_MTU_CAN_FD 64U
define CANARD_MTU_MAX CANARD_MTU_CAN_FD
typedef struct TxItem { CanardTxQueueItem base; uint8_t payload_buffer[CANARD_MTU_MAX]; } TxItem; `