/* Converts a Mode Register bit mask to a data bit configuration enum value. 
Converts a bit mask representing the UART's data bit setting within the UART's Mode Register into a value of an enumeration type provided by the UART driver API. */
static enum uart_config_data_bits uart_xlnx_ps_ll2cfg_databits(uint32_t mode_reg)
/* Converts a Mode Register bit mask to a data bit configuration enum value. 
Converts a bit mask representing the UART's data bit setting within the UART's Mode Register into a value of an enumeration type provided by the UART driver API. */
static enum uart_config_data_bits uart_xlnx_ps_ll2cfg_databits(uint32_t mode_reg)
{
	switch ((mode_reg & XUARTPS_MR_CHARLEN_MASK)) {
	case XUARTPS_MR_CHARLEN_8_BIT:
	default:
		return UART_CFG_DATA_BITS_8;
	case XUARTPS_MR_CHARLEN_7_BIT:
		return UART_CFG_DATA_BITS_7;
	case XUARTPS_MR_CHARLEN_6_BIT:
		return UART_CFG_DATA_BITS_6;
	}
}