/* This function clears the wake-up interrupt flag to clear the interrupt it gives. */
int32_t can_ctrl_clear_wake_flag(struct can_ctrl_dev *dev)
/* This function clears the wake-up interrupt flag to clear the interrupt it gives. */
int32_t can_ctrl_clear_wake_flag(struct can_ctrl_dev *dev)
{
	int32_t ret;
	uint32_t data;
	ret = can_ctrl_sfr_word_read(dev, CAN_CTRL_REG_INT, &data);
	if(ret != 0)
		return ret;
	data &= ~INT_WAKIF_MODE(true);
	return can_ctrl_sfr_byte_write(dev, (CAN_CTRL_REG_INT + 1),
				       *(((uint8_t *)&data) + 1));
}