Lines Matching refs:config
39 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_poll_in() local
42 if (UART_GetStatusFlag(config->base, kUART_RxDataReadyFlag)) { in mcux_iuart_poll_in()
43 *c = UART_ReadByte(config->base); in mcux_iuart_poll_in()
52 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_poll_out() local
54 while (!(UART_GetStatusFlag(config->base, kUART_TxReadyFlag))) { in mcux_iuart_poll_out()
57 UART_WriteByte(config->base, c); in mcux_iuart_poll_out()
62 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_err_check() local
65 if (UART_GetStatusFlag(config->base, kUART_RxOverrunFlag)) { in mcux_iuart_err_check()
67 UART_ClearStatusFlag(config->base, kUART_RxOverrunFlag); in mcux_iuart_err_check()
70 if (UART_GetStatusFlag(config->base, kUART_ParityErrorFlag)) { in mcux_iuart_err_check()
72 UART_ClearStatusFlag(config->base, kUART_ParityErrorFlag); in mcux_iuart_err_check()
75 if (UART_GetStatusFlag(config->base, kUART_FrameErrorFlag)) { in mcux_iuart_err_check()
77 UART_ClearStatusFlag(config->base, kUART_FrameErrorFlag); in mcux_iuart_err_check()
88 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_fifo_fill() local
92 (UART_GetStatusFlag(config->base, kUART_TxEmptyFlag))) { in mcux_iuart_fifo_fill()
94 UART_WriteByte(config->base, tx_data[num_tx++]); in mcux_iuart_fifo_fill()
103 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_fifo_read() local
107 (UART_GetStatusFlag(config->base, kUART_RxDataReadyFlag))) { in mcux_iuart_fifo_read()
109 rx_data[num_rx++] = UART_ReadByte(config->base); in mcux_iuart_fifo_read()
117 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_tx_enable() local
119 UART_EnableInterrupts(config->base, kUART_TxEmptyEnable); in mcux_iuart_irq_tx_enable()
124 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_tx_disable() local
126 UART_DisableInterrupts(config->base, kUART_TxEmptyEnable); in mcux_iuart_irq_tx_disable()
131 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_tx_complete() local
133 return (UART_GetStatusFlag(config->base, kUART_TxEmptyFlag)) != 0U; in mcux_iuart_irq_tx_complete()
138 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_tx_ready() local
141 return (UART_GetEnabledInterrupts(config->base) & mask) in mcux_iuart_irq_tx_ready()
147 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_rx_enable() local
150 UART_EnableInterrupts(config->base, mask); in mcux_iuart_irq_rx_enable()
155 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_rx_disable() local
158 UART_DisableInterrupts(config->base, mask); in mcux_iuart_irq_rx_disable()
163 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_rx_full() local
165 return (UART_GetStatusFlag(config->base, kUART_RxDataReadyFlag)) != 0U; in mcux_iuart_irq_rx_full()
170 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_rx_pending() local
173 return (UART_GetEnabledInterrupts(config->base) & mask) in mcux_iuart_irq_rx_pending()
179 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_err_enable() local
183 UART_EnableInterrupts(config->base, mask); in mcux_iuart_irq_err_enable()
188 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_irq_err_disable() local
192 UART_DisableInterrupts(config->base, mask); in mcux_iuart_irq_err_disable()
227 const struct mcux_iuart_config *config = dev->config; in mcux_iuart_init() local
232 if (!device_is_ready(config->clock_dev)) { in mcux_iuart_init()
236 if (clock_control_get_rate(config->clock_dev, config->clock_subsys, in mcux_iuart_init()
244 uart_config.baudRate_Bps = config->baud_rate; in mcux_iuart_init()
246 clock_control_on(config->clock_dev, config->clock_subsys); in mcux_iuart_init()
247 switch (config->parity) { in mcux_iuart_init()
261 UART_Init(config->base, &uart_config, clock_freq); in mcux_iuart_init()
263 err = pinctrl_apply_state(config->pincfg, PINCTRL_STATE_DEFAULT); in mcux_iuart_init()
265 clock_control_off(config->clock_dev, config->clock_subsys); in mcux_iuart_init()
270 config->irq_config_func(dev); in mcux_iuart_init()