BM_INIT_CAN_MSG 常量与宏参考
BMAPI 1.14.0.42 · bm_usb_def.h
#define BM_INIT_CAN_MSG(_msg, _id, _dlc, _ide, _fdf, _brs, _rtr, _esi, _payload) { \ (_msg).ctrl.tx.DLC = (_dlc); \ (_msg).ctrl.tx.IDE = (_ide); \ (_msg).ctrl.tx.FDF = (_fdf); \ (_msg).ctrl.tx.BRS = (_brs); \ (_msg).ctrl.tx.RTR = (_rtr); \ (_msg).ctrl.tx.ESI = (_esi); \ BM_SET_CAN_MSG_ID((_msg), (_id)); \ if ((_payload) != NULL) { uint8_t i; for (i = 0; i < sizeof((_msg).payload); i++) { (_msg).payload[i] = ((uint8_t*)(_payload))[i]; } } \}Value:
{ \ (_msg).ctrl.tx.DLC = (_dlc); \ (_msg).ctrl.tx.IDE = (_ide); \ (_msg).ctrl.tx.FDF = (_fdf); \ (_msg).ctrl.tx.BRS = (_brs); \ (_msg).ctrl.tx.RTR = (_rtr); \ (_msg).ctrl.tx.ESI = (_esi); \ BM_SET_CAN_MSG_ID((_msg), (_id)); \ if ((_payload) != NULL) { uint8_t i; for (i = 0; i < sizeof((_msg).payload); i++) { (_msg).payload[i] = ((uint8_t*)(_payload))[i]; } } \}关联类型与常量
Section titled “关联类型与常量”来源:BMAPI 1.14.0.42 正式 Doxygen 文档。技术说明保留原文;安装包中的头文件和帮助文档定义对应版本的接口契约。