Lines Matching refs:uart_cfg
120 struct swm_uart_cfg *uart_cfg; member
160 struct swm_uart_cfg *uart_cfg; in swm_uart_configure() local
163 uart_cfg = serial_device->parent.user_data; in swm_uart_configure()
165 uart_cfg->uart_initstruct.Baudrate = configure->baud_rate; in swm_uart_configure()
169 uart_cfg->uart_initstruct.DataBits = UART_DATA_8BIT; in swm_uart_configure()
172 uart_cfg->uart_initstruct.DataBits = UART_DATA_9BIT; in swm_uart_configure()
175 uart_cfg->uart_initstruct.DataBits = UART_DATA_8BIT; in swm_uart_configure()
181 uart_cfg->uart_initstruct.StopBits = UART_STOP_1BIT; in swm_uart_configure()
184 uart_cfg->uart_initstruct.StopBits = UART_STOP_2BIT; in swm_uart_configure()
187 uart_cfg->uart_initstruct.StopBits = UART_STOP_1BIT; in swm_uart_configure()
193 uart_cfg->uart_initstruct.Parity = UART_PARITY_NONE; in swm_uart_configure()
196 uart_cfg->uart_initstruct.Parity = UART_PARITY_ODD; in swm_uart_configure()
199 uart_cfg->uart_initstruct.Parity = UART_PARITY_EVEN; in swm_uart_configure()
202 uart_cfg->uart_initstruct.Parity = UART_PARITY_NONE; in swm_uart_configure()
206 UART_Init(uart_cfg->UARTx, &(uart_cfg->uart_initstruct)); in swm_uart_configure()
207 UART_Open(uart_cfg->UARTx); in swm_uart_configure()
213 struct swm_uart_cfg *uart_cfg; in swm_uart_control() local
215 uart_cfg = serial_device->parent.user_data; in swm_uart_control()
221 NVIC_DisableIRQ(uart_cfg->irq); in swm_uart_control()
225 NVIC_EnableIRQ(uart_cfg->irq); in swm_uart_control()
233 struct swm_uart_cfg *uart_cfg; in swm_uart_putc() local
235 uart_cfg = serial_device->parent.user_data; in swm_uart_putc()
237 while (UART_IsTXFIFOFull(uart_cfg->UARTx)) in swm_uart_putc()
239 UART_WriteByte(uart_cfg->UARTx, c); in swm_uart_putc()
240 while (UART_IsTXBusy(uart_cfg->UARTx)) in swm_uart_putc()
248 struct swm_uart_cfg *uart_cfg; in swm_uart_getc() local
250 uart_cfg = serial_device->parent.user_data; in swm_uart_getc()
253 if (UART_IsRXFIFOEmpty(uart_cfg->UARTx) == 0) in swm_uart_getc()
255 UART_ReadByte(uart_cfg->UARTx, (uint32_t *)&ch); in swm_uart_getc()
275 struct swm_uart_cfg *uart_cfg; in rt_hw_uart_isr() local
277 uart_cfg = serial_device->parent.user_data; in rt_hw_uart_isr()
280 …if (UART_INTStat(uart_cfg->UARTx, UART_IT_RX_THR) || UART_INTStat(uart_cfg->UARTx, UART_IT_RX_TOUT… in rt_hw_uart_isr()
363 uart_obj[i].uart_cfg = &swm_uart_cfg[i]; in swm_uart_init()
367 result = rt_hw_serial_register(&uart_obj[i].serial_device, uart_obj[i].uart_cfg->name, in swm_uart_init()
368 … RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX, uart_obj[i].uart_cfg); in swm_uart_init()