Lines Matching full:async
226 struct uarte_async_cb *async; member
381 if (data->async && HW_RX_COUNTING_ENABLED(config)) { in uarte_disable_locked()
384 data->async->rx.total_byte_cnt = 0; in uarte_disable_locked()
385 data->async->rx.total_user_byte_cnt = 0; in uarte_disable_locked()
670 if (data->async) { in uarte_periph_enable()
676 for (int i = 0; i < data->async->rx.flush_cnt; i++) { in uarte_periph_enable()
776 ret = nrfx_gppi_channel_alloc(&data->async->rx.cnt.ppi); in uarte_nrfx_rx_counting_init()
783 nrfx_gppi_channel_endpoints_setup(data->async->rx.cnt.ppi, evt_addr, tsk_addr); in uarte_nrfx_rx_counting_init()
784 nrfx_gppi_channels_enable(BIT(data->async->rx.cnt.ppi)); in uarte_nrfx_rx_counting_init()
815 k_timer_init(&data->async->rx.timer, rx_timeout, NULL); in uarte_async_init()
816 k_timer_user_data_set(&data->async->rx.timer, (void *)dev); in uarte_async_init()
817 k_timer_init(&data->async->tx.timer, tx_timeout, NULL); in uarte_async_init()
818 k_timer_user_data_set(&data->async->tx.timer, (void *)dev); in uarte_async_init()
832 data->async->tx.pending = true; in start_tx_locked()
834 data->async->tx.pending = false; in start_tx_locked()
835 data->async->tx.amount = -1; in start_tx_locked()
836 tx_start(dev, data->async->tx.xfer_buf, data->async->tx.xfer_len); in start_tx_locked()
849 size_t remaining = data->async->tx.len - data->async->tx.cache_offset; in setup_tx_cache()
857 data->async->tx.xfer_len = len; in setup_tx_cache()
858 data->async->tx.xfer_buf = config->tx_cache; in setup_tx_cache()
859 memcpy(config->tx_cache, &data->async->tx.buf[data->async->tx.cache_offset], len); in setup_tx_cache()
886 if (data->async->tx.len) { in uarte_nrfx_tx()
891 data->async->tx.len = len; in uarte_nrfx_tx()
892 data->async->tx.buf = buf; in uarte_nrfx_tx()
895 data->async->tx.xfer_buf = buf; in uarte_nrfx_tx()
896 data->async->tx.xfer_len = len; in uarte_nrfx_tx()
898 data->async->tx.cache_offset = 0; in uarte_nrfx_tx()
925 k_timer_start(&data->async->tx.timer, K_USEC(timeout), K_NO_WAIT); in uarte_nrfx_tx()
935 if (data->async->tx.buf == NULL) { in uarte_nrfx_tx_abort()
939 data->async->tx.pending = false; in uarte_nrfx_tx_abort()
940 k_timer_stop(&data->async->tx.timer); in uarte_nrfx_tx_abort()
950 if (data->async->user_callback) { in user_callback()
951 data->async->user_callback(dev, evt, data->async->user_data); in user_callback()
960 .data.rx.buf = data->async->rx.buf, in notify_uart_rx_rdy()
962 .data.rx.offset = data->async->rx.offset in notify_uart_rx_rdy()
1005 struct uarte_async_rx *async_rx = &data->async->rx; in uarte_nrfx_rx_enable()
1150 struct uarte_async_rx *async_rx = &data->async->rx; in uarte_nrfx_rx_buf_rsp()
1199 if (!data->async) { in uarte_nrfx_callback_set()
1203 data->async->user_callback = callback; in uarte_nrfx_callback_set()
1204 data->async->user_data = user_data; in uarte_nrfx_callback_set()
1212 struct uarte_async_rx *async_rx = &data->async->rx; in uarte_nrfx_rx_disable()
1266 struct uarte_async_rx *async_rx = &data->async->rx; in rx_timeout()
1292 struct uarte_async_rx *async_rx = &data->async->rx; in rx_timeout()
1404 struct uarte_async_rx *async_rx = &data->async->rx; in rxstarted_isr()
1427 struct uarte_async_rx *async_rx = &data->async->rx; in endrx_isr()
1565 struct uarte_async_rx *async_rx = &data->async->rx; in rxto_isr()
1626 size_t amount = (data->async->tx.amount >= 0) ? in txstopped_isr()
1627 data->async->tx.amount : nrf_uarte_tx_amount_get(uarte); in txstopped_isr()
1642 if (!data->async->tx.buf) { in txstopped_isr()
1650 if (data->async->tx.pending) { in txstopped_isr()
1658 if (data->async->tx.buf != data->async->tx.xfer_buf) { in txstopped_isr()
1662 if (amount == data->async->tx.xfer_len) { in txstopped_isr()
1663 data->async->tx.cache_offset += amount; in txstopped_isr()
1672 amount = data->async->tx.cache_offset; in txstopped_isr()
1675 amount += data->async->tx.cache_offset; in txstopped_isr()
1679 k_timer_stop(&data->async->tx.timer); in txstopped_isr()
1682 .data.tx.buf = data->async->tx.buf, in txstopped_isr()
1685 if (amount == data->async->tx.len) { in txstopped_isr()
1692 data->async->tx.buf = NULL; in txstopped_isr()
1693 data->async->tx.len = 0; in txstopped_isr()
1710 data->async->rx.idle_cnt = 0; in rxdrdy_isr()
1711 k_timer_start(&data->async->rx.timer, data->async->rx.timeout, K_NO_WAIT); in rxdrdy_isr()
1714 data->async->rx.cnt.cnt++; in rxdrdy_isr()
1736 struct uarte_async_rx *async_rx = &data->async->rx; in uarte_nrfx_isr_async()
1829 if (data->async) { in uarte_nrfx_poll_in()
1870 if (data->async && data->async->tx.len && in uarte_nrfx_poll_out()
1871 data->async->tx.amount < 0) { in uarte_nrfx_poll_out()
1872 data->async->tx.amount = nrf_uarte_tx_amount_get(uarte); in uarte_nrfx_poll_out()
2207 if (data->async) { in uarte_pm_suspend()
2211 __ASSERT_NO_MSG(!data->async->rx.enabled); in uarte_pm_suspend()
2212 __ASSERT_NO_MSG(!data->async->tx.len); in uarte_pm_suspend()
2223 if (data->async && HW_RX_COUNTING_ENABLED(cfg)) { in uarte_pm_suspend()
2226 data->async->rx.total_byte_cnt = 0; in uarte_pm_suspend()
2227 data->async->rx.total_user_byte_cnt = 0; in uarte_pm_suspend()
2353 if (data->async) { in uarte_instance_init()
2376 /* Low power mode is used when disable_rx is not defined or in async mode if
2446 (.async = &uarte##idx##_async,)) \