ZHCAF63 June 2024 MSPM0G3507
节 3.2 中列出了各种可配置的参数。用户可以通过修改 user_define.h 中定义的所有参数来配置 CAN 或 I2C 数据包帧、FIFO 的大小或数据区域的最大规模。
用户还可以在 user_define.h 中修改 Custom_Element 的定义。可根据应用程序和存储要求增加或减少条目。
/*user-defined information storage structure */
typedef struct {
/*! Origin Identifier, indicating the origin of the message */
uint32_t origin_id;
/*! Destination Identifier, indicating the destination of the message */
uint32_t destination_id;
/*! Data Length Code */
uint8_t dlc;
/*! Data bytes */
uint8_t data[TRANSMIT_DATA_LENGTH];
} Custom_Element;
两个通信接口的接收和传输单独运行。消息将通过 FIFO 传送。用户可以更改结构。例如,用户可以使消息遵循特定的格式,甚至遵循特定的通信协议。根据 图 2-3,该结构可以拆分为单向传输。