Lines Matching refs:length
482 if (p_config->tx_cache.length == 0) in nrfx_uarte_init()
484 p_cb->tx.cache.length = 0; in nrfx_uarte_init()
488 p_cb->tx.cache.length = p_config->tx_cache.length - 1; in nrfx_uarte_init()
490 if (p_config->rx_cache.length >= UARTE_HW_RX_FIFO_SIZE) in nrfx_uarte_init()
493 p_cb->rx.flush.length = 0; in nrfx_uarte_init()
496 if (p_config->rx_cache.length < (UARTE_HW_RX_FIFO_SIZE + MIN_RX_CACHE_SIZE)) in nrfx_uarte_init()
500 size_t cache_len = p_config->rx_cache.length - UARTE_HW_RX_FIFO_SIZE; in nrfx_uarte_init()
708 uint32_t length, in wait_for_endtx() argument
735 err = ((p_tx == p_buf) && (length > amount)) ? NRFX_ERROR_FORBIDDEN : NRFX_SUCCESS; in wait_for_endtx()
779 p_cb->tx.cache.p_buffer[p_cb->tx.cache.length] = *p_byte; in poll_out()
780 p_buf = &p_cb->tx.cache.p_buffer[p_cb->tx.cache.length]; in poll_out()
820 uint32_t chunk_len = NRFX_MIN(p_cb->tx.cache.length, p_cb->tx.curr.length - p_cb->tx.off); in tx_prepare_start()
829 xfer_len = p_cb->tx.curr.length; in tx_prepare_start()
839 uint32_t length, in blocking_tx() argument
851 for (uint32_t i = 0; i < length; i++) in blocking_tx()
881 size_t length, in nrfx_uarte_tx() argument
888 NRFX_ASSERT(UARTE_LENGTH_VALIDATE(p_instance->drv_inst_idx, length)); in nrfx_uarte_tx()
890 NRFX_ASSERT(length > 0); in nrfx_uarte_tx()
895 if (length == 0) in nrfx_uarte_tx()
902 if (p_cb->tx.curr.length == 0) in nrfx_uarte_tx()
904 p_cb->tx.curr.length = length; in nrfx_uarte_tx()
911 err_code = blocking_tx(p_instance, p_data, length, 0); in nrfx_uarte_tx()
912 p_cb->tx.curr.length = 0; in nrfx_uarte_tx()
919 return blocking_tx(p_instance, p_data, length, flags); in nrfx_uarte_tx()
952 if (p_cb->tx.curr.length == 0) in nrfx_uarte_tx()
954 p_cb->tx.curr.length = length; in nrfx_uarte_tx()
975 !p_cb->tx.next.length && (flags & NRFX_UARTE_TX_LINK)) in nrfx_uarte_tx()
994 p_cb->tx.next.length = length; in nrfx_uarte_tx()
1003 nrfy_uarte_tx_buffer_set(p_uarte, p_data, length); in nrfx_uarte_tx()
1029 return (m_cb[p_instance->drv_inst_idx].tx.curr.length != 0); in nrfx_uarte_tx_in_progress()
1039 if (p_cb->tx.curr.length == 0) in nrfx_uarte_tx_abort()
1053 p_cb->tx.curr.length = 0; in nrfx_uarte_tx_abort()
1114 .length = len in user_handler_on_rx_done()
1141 .length = len, in user_handler_on_tx_done()
1214 bool user_buf_end = p_cache->user[0].length == p_cache->received; in handler_on_rx_done()
1224 if (p_cache->user[0].length) in handler_on_rx_done()
1238 if (p_cb->rx.flush.length == 0) in rx_flushed_handler()
1243 if ((uint32_t)p_cb->rx.flush.length >= p_cb->rx.curr.length) in rx_flushed_handler()
1246 size_t len = p_cb->rx.curr.length; in rx_flushed_handler()
1249 p_cb->rx.curr.length = 0; in rx_flushed_handler()
1251 p_cb->rx.flush.length -= len; in rx_flushed_handler()
1252 memmove(p_cb->rx.flush.p_buffer, &p_cb->rx.flush.p_buffer[len], p_cb->rx.flush.length); in rx_flushed_handler()
1274 memcpy(p_cb->rx.curr.p_buffer, p_cb->rx.flush.p_buffer, p_cb->rx.flush.length); in rx_flushed_handler()
1275 p_cb->rx.off = p_cb->rx.flush.length; in rx_flushed_handler()
1276 p_cb->rx.flush.length = 0; in rx_flushed_handler()
1361 size_t length) in rx_buffer_set() argument
1374 p_cb->rx.curr.length = length; in rx_buffer_set()
1380 p_cb->rx.curr.length - p_cb->rx.off); in rx_buffer_set()
1395 p_cb->rx.next.length = length; in rx_buffer_set()
1397 nrfy_uarte_rx_buffer_set(p_uarte, p_data, length); in rx_buffer_set()
1425 size_t user_len = p_cache->user[0].length; in get_cache_buf_len()
1430 if (p_cache->user[1].length) { in get_cache_buf_len()
1432 len = get_curr_cache_buf_len(p_cache->cache_len, p_cache->user[1].length, 0); in get_cache_buf_len()
1443 size_t length) in nrfx_uarte_rx_buffer_set() argument
1446 NRFX_ASSERT(UARTE_LENGTH_VALIDATE(p_instance->drv_inst_idx, length)); in nrfx_uarte_rx_buffer_set()
1448 NRFX_ASSERT(length > 0); in nrfx_uarte_rx_buffer_set()
1478 p_cache->user[0].length = length; in nrfx_uarte_rx_buffer_set()
1480 length = get_cache_buf_len(p_cache); in nrfx_uarte_rx_buffer_set()
1489 p_cache->user[1].length = length; in nrfx_uarte_rx_buffer_set()
1493 length = get_cache_buf_len(p_cache); in nrfx_uarte_rx_buffer_set()
1517 err = rx_buffer_set(p_uarte, p_cb, p_data, length); in nrfx_uarte_rx_buffer_set()
1529 p_cb->rx.flush.length = 0; in rx_flush()
1555 p_cb->rx.flush.length = nrfy_uarte_event_check(p_uarte, NRF_UARTE_EVENT_RXSTARTED) ? in rx_flush()
1560 p_cb->rx.flush.length = nrfy_uarte_rx_amount_get(p_uarte); in rx_flush()
1602 p_cb->rx.flush.length = 0; in rx_abort()
1652 size_t length) in nrfx_uarte_rx() argument
1654 nrfx_err_t err_code = nrfx_uarte_rx_buffer_set(p_instance, p_data, length); in nrfx_uarte_rx()
1658 NRFX_ASSERT(UARTE_LENGTH_VALIDATE(p_instance->drv_inst_idx, length)); in nrfx_uarte_rx()
1660 NRFX_ASSERT(length > 0); in nrfx_uarte_rx()
1685 if ((err_code == NRFX_ERROR_ALREADY) || (length > rx_amount)) in nrfx_uarte_rx()
1834 on_rx_disabled(p_uarte, p_cb, p_cb->rx.flush.length); in rxto_irq_handler()
1915 tx_start(p_uarte, p_tx->curr.p_buffer, p_tx->curr.length, true); in pending_tx_handler()
1931 if (p_cb->tx.curr.length == 0) in txstopped_irq_handler()
1961 if (p_cb->tx.off == p_cb->tx.curr.length || aborted) in txstopped_irq_handler()
1967 p_cb->tx.curr.length = 0; in txstopped_irq_handler()
1991 uint32_t len = p_cb->tx.curr.length; in endtx_irq_handler()
2007 p_cb->tx.next.length = 0; in endtx_irq_handler()