佚名通过本文主要向大家介绍了ccan,ccan认证,ccan考试,arm linux gcc,arm linux等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题:arm_linux_c can口编程 结构体赋值问题
描述:
rx = msgs.mmsg[i];
这样赋值时把什么数据给他了呢?
描述:
armc语言linuxstruct
//## The CAN message structure.
typedef struct {
//flags, indicating or controlling special message properties
int flags;
int cob; //CAN object number, used in Full CAN
unsigned long id; //CAN message ID, 4 bytes
struct timeval timestamp; //time stamp for received messages
short int length; //number of bytes in the CAN message
unsigned char data[CAN_MSG_LENGTH]; //data, 0...8 bytes
} canmsg_t;
typedef struct {
canmsg_t mmsg[83];
int mnum;
}canmsgs_t;
int i = 0;
for (i = 0; i < msgs.mnum; ++i)//循环msgs中有can数据的帧数
{
rx = msgs.mmsg[i]; //将一帧数据赋值给rx
}
rx = msgs.mmsg[i];
这样赋值时把什么数据给他了呢?