/* Set SLCD automated character. 
Set automated character mode. */
enum status_code slcd_automated_char_set_config(struct slcd_automated_char_config *const config)
/* Set SLCD automated character. 
Set automated character mode. */
enum status_code slcd_automated_char_set_config(struct slcd_automated_char_config *const config)
{
	if (!config) {
		return STATUS_ERR_INVALID_ARG;
	}
	SLCD->CMCFG.reg = SLCD_CMCFG_NSEG(config->seg_line_num)
					 | (config->order  << SLCD_CMCFG_DEC_Pos);
	SLCD->ACMCFG.reg = SLCD_ACMCFG_FCS(config->fc)
					 | (config->mode << SLCD_ACMCFG_MODE_Pos)
					 | SLCD_ACMCFG_STSEG(config->start_seg_line)
					 | SLCD_ACMCFG_NDROW(config->row_digit_num)
					 | SLCD_ACMCFG_NDIG(config->digit_num)
					 | SLCD_ACMCFG_STEPS(config->scrolling_step)
					 | SLCD_ACMCFG_NCOM(config->com_line_num);
	SLCD->CMDMASK.reg = SLCD_CMDMASK_SDMASK(config->data_mask);
	return STATUS_OK;
}