/* Clears a message object so that it is no longer used. */
void CANMessageClear(unsigned long ulBase, unsigned long ulObjID)
/* Clears a message object so that it is no longer used. */
void CANMessageClear(unsigned long ulBase, unsigned long ulObjID)
{
    ASSERT(CANBaseValid(ulBase));
    ASSERT((ulObjID >= 1) && (ulObjID <= 32));
    while(CANRegRead(ulBase + CAN_O_IF1CRQ) & CAN_IF1CRQ_BUSY)
    {
    }
    CANRegWrite(ulBase + CAN_O_IF1CMSK, CAN_IF1CMSK_WRNRD | CAN_IF1CMSK_ARB);
    CANRegWrite(ulBase + CAN_O_IF1ARB1, 0);
    CANRegWrite(ulBase + CAN_O_IF1ARB2, 0);
    CANRegWrite(ulBase + CAN_O_IF1CRQ, ulObjID & CAN_IF1CRQ_MNUM_M);
}