Lines Matching refs:rx_data
84 struct mcux_flexcomm_uart_rx_data rx_data; member
161 static int mcux_flexcomm_fifo_read(const struct device *dev, uint8_t *rx_data, in mcux_flexcomm_fifo_read() argument
171 rx_data[num_rx++] = USART_ReadByte(config->base); in mcux_flexcomm_fifo_read()
570 data->rx_data.xfer_buf = buf; in mcux_flexcomm_uart_rx_enable()
571 data->rx_data.xfer_len = len; in mcux_flexcomm_uart_rx_enable()
572 data->rx_data.active_block.dest_address = (uint32_t)data->rx_data.xfer_buf; in mcux_flexcomm_uart_rx_enable()
573 data->rx_data.active_block.source_address = (uint32_t) &config->base->FIFORD; in mcux_flexcomm_uart_rx_enable()
574 data->rx_data.active_block.block_size = data->rx_data.xfer_len; in mcux_flexcomm_uart_rx_enable()
582 data->rx_data.timeout = timeout; in mcux_flexcomm_uart_rx_enable()
621 size_t total_rx_receive_len = data->rx_data.xfer_len - status.pending_length; in flexcomm_uart_rx_update()
624 if (total_rx_receive_len > data->rx_data.offset) { in flexcomm_uart_rx_update()
626 data->rx_data.count = total_rx_receive_len - data->rx_data.offset; in flexcomm_uart_rx_update()
629 .data.rx.buf = data->rx_data.xfer_buf, in flexcomm_uart_rx_update()
630 .data.rx.len = data->rx_data.count, in flexcomm_uart_rx_update()
631 .data.rx.offset = data->rx_data.offset, in flexcomm_uart_rx_update()
638 data->rx_data.offset += data->rx_data.count; in flexcomm_uart_rx_update()
639 data->rx_data.count = 0; in flexcomm_uart_rx_update()
660 (void)k_work_cancel_delayable(&data->rx_data.timeout_work); in mcux_flexcomm_uart_rx_disable()
681 .data.rx_buf.buf = data->rx_data.xfer_buf, in mcux_flexcomm_uart_rx_disable()
687 if (data->rx_data.next_xfer_buf) { in mcux_flexcomm_uart_rx_disable()
690 .data.rx_buf.buf = data->rx_data.next_xfer_buf in mcux_flexcomm_uart_rx_disable()
697 data->rx_data.xfer_buf = NULL; in mcux_flexcomm_uart_rx_disable()
698 data->rx_data.xfer_len = 0; in mcux_flexcomm_uart_rx_disable()
699 data->rx_data.next_xfer_buf = NULL; in mcux_flexcomm_uart_rx_disable()
700 data->rx_data.next_xfer_len = 0; in mcux_flexcomm_uart_rx_disable()
701 data->rx_data.offset = 0; in mcux_flexcomm_uart_rx_disable()
702 data->rx_data.count = 0; in mcux_flexcomm_uart_rx_disable()
720 if (data->rx_data.next_xfer_buf != NULL || data->rx_data.next_xfer_len != 0) { in mcux_flexcomm_uart_rx_buf_rsp()
730 data->rx_data.next_xfer_buf = buf; in mcux_flexcomm_uart_rx_buf_rsp()
731 data->rx_data.next_xfer_len = len; in mcux_flexcomm_uart_rx_buf_rsp()
768 (void)k_work_cancel_delayable(&data->rx_data.timeout_work); in mcux_flexcomm_uart_dma_rx_callback()
776 .data.rx_buf.buf = data->rx_data.xfer_buf, in mcux_flexcomm_uart_dma_rx_callback()
781 if (data->rx_data.next_xfer_buf) { in mcux_flexcomm_uart_dma_rx_callback()
783 data->rx_data.xfer_buf = data->rx_data.next_xfer_buf; in mcux_flexcomm_uart_dma_rx_callback()
784 data->rx_data.xfer_len = data->rx_data.next_xfer_len; in mcux_flexcomm_uart_dma_rx_callback()
785 data->rx_data.next_xfer_buf = NULL; in mcux_flexcomm_uart_dma_rx_callback()
786 data->rx_data.next_xfer_len = 0; in mcux_flexcomm_uart_dma_rx_callback()
789 data->rx_data.active_block.block_size = data->rx_data.xfer_len; in mcux_flexcomm_uart_dma_rx_callback()
790 data->rx_data.active_block.dest_address = (uint32_t) data->rx_data.xfer_buf; in mcux_flexcomm_uart_dma_rx_callback()
792 data->rx_data.active_block.source_address, in mcux_flexcomm_uart_dma_rx_callback()
793 data->rx_data.active_block.dest_address, in mcux_flexcomm_uart_dma_rx_callback()
794 data->rx_data.active_block.block_size); in mcux_flexcomm_uart_dma_rx_callback()
812 data->rx_data.count = 0; in mcux_flexcomm_uart_dma_rx_callback()
813 data->rx_data.offset = 0; in mcux_flexcomm_uart_dma_rx_callback()
922 k_work_init_delayable(&data->rx_data.timeout_work, in flexcomm_uart_async_init()
962 if (data->rx_data.timeout == 0) { in mcux_flexcomm_isr()
964 } else if (data->rx_data.timeout != SYS_FOREVER_US) { in mcux_flexcomm_isr()
965 k_work_reschedule(&data->rx_data.timeout_work, in mcux_flexcomm_isr()
966 K_USEC(data->rx_data.timeout)); in mcux_flexcomm_isr()
1170 &mcux_flexcomm_##n##_data.rx_data.active_block, \