/* Responsible for different function parameters like TX Queue, wake-up filter, etc. */
static int32_t can_ctrl_con_reg_config(struct can_ctrl_dev *dev, struct can_ctrl_init_param *init_param)
/* Responsible for different function parameters like TX Queue, wake-up filter, etc. */
static int32_t can_ctrl_con_reg_config(struct can_ctrl_dev *dev, struct can_ctrl_init_param *init_param)
{
	int32_t ret;
	uint32_t temp;
	ret = can_ctrl_sfr_word_read(dev, CAN_CTRL_REG_CON, &temp);
	if(ret != 0)
		return ret;
	temp &= ~(CON_TXQEN_MODE(WORD_MASK) | CON_STEF_MODE(WORD_MASK) |
		  CON_ISOCRCEN_MODE(WORD_MASK) |
		  CON_WAKFIL_MODE(WORD_MASK));
	temp |= CON_TXQEN_MODE(init_param->con_txq_en) |
		CON_STEF_MODE(init_param->con_store_in_tef_en) |
		CON_ISOCRCEN_MODE(init_param->con_iso_crc_en) |
		CON_WAKFIL_MODE(true);
	return can_ctrl_sfr_word_write(dev, CAN_CTRL_REG_CON, temp);
}