We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have a function that creates an instance of a structure on the users stack. The structure is called object and it is located at address 0xEFB0.
boolean CAN1_read(ubyte mbx, CAN_MSG *msg) { ubyte newd; TCAN1_Obj object; if ( newd = CAN1_ubNewData(mbx) ) { CAN1_vGetMsgObj(mbx, &object); CAN1_vReleaseObj(mbx); msg->id = object.ulArbitr; msg->size = object.ubMsgCfg >> 4; memcpy(&msg->data[0], &object.ubData[0], msg->size); } return((boolean)newd); }
CAN1_vGetMsgObj(mbx, (TCAN1_Obj huge *)&object);