
// Receive Data from the IF2 buffer
bit receive_data (char MsgNum)
{
  SFRPAGE  = CAN0_PAGE; // IF2 already set up for RX

  CAN0ADR  = IF2CMDRQST;// Point to Command Request Reg.
  CAN0DATL = MsgNum;    // Move new data for RX from Msg Obj "MsgNum"
                        // Move new data to a
  CAN0ADR  = IF2MSGC;
  if(!(CAN0DATH & 0x80)) {
    SFRPAGE  = LEGACY_PAGE;
    return(0);
  }
  CAN0DATH=0;
  
  read Data, then return(1)
}
