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);
Maybe switch to the previous version of the compiler? - Mike