void CAN_clearMessage(uint32_t base, uint32_t objID) { // // Check the arguments. // ASSERT(CAN_isBaseValid(base)); ASSERT((objID >= 1U) && (objID <= 32U)); // // Wait for busy bit to clear // while((HWREGH(base + CAN_O_IF1CMD) & CAN_IF1CMD_BUSY) == CAN_IF1CMD_BUSY) { } // // Clear the message valid bit in the arbitration register. This indicates // the message is not valid. // HWREG_BP(base + CAN_O_IF1ARB) = 0U; HWREG_BP(base + CAN_O_IF1CMD) = (CAN_IF1CMD_DIR | CAN_IF1CMD_ARB); // // Initiate programming the message object // HWREGH(base + CAN_O_IF1CMD) = objID & CAN_IF1CMD_MSG_NUM_M; }