Lines Matching +full:hw +full:- +full:rx +full:- +full:buffer +full:- +full:offset
2 * Copyright (c) 2016-2019 Nordic Semiconductor ASA
4 * SPDX-License-Identifier: Apache-2.0
117 * @retval -EINVAL for invalid baudrate.
192 return -EINVAL; in baudrate_set()
206 * @return 0 if a character arrived, -1 if the input buffer if empty.
212 return -1; in uart_nrfx_poll_in()
248 * return -EBUSY during poll_out. in uart_nrfx_poll_out()
271 if (--safety_cnt == 0) { in uart_nrfx_poll_out()
311 struct uart_nrfx_data *data = dev->data; in uart_nrfx_configure()
315 switch (cfg->stop_bits) { in uart_nrfx_configure()
323 return -ENOTSUP; in uart_nrfx_configure()
326 if (cfg->stop_bits != UART_CFG_STOP_BITS_1) { in uart_nrfx_configure()
327 return -ENOTSUP; in uart_nrfx_configure()
331 if (cfg->data_bits != UART_CFG_DATA_BITS_8) { in uart_nrfx_configure()
332 return -ENOTSUP; in uart_nrfx_configure()
335 switch (cfg->flow_ctrl) { in uart_nrfx_configure()
343 return -ENOTSUP; in uart_nrfx_configure()
347 return -ENOTSUP; in uart_nrfx_configure()
353 switch (cfg->parity) { in uart_nrfx_configure()
367 return -ENOTSUP; in uart_nrfx_configure()
370 if (baudrate_set(dev, cfg->baudrate) != 0) { in uart_nrfx_configure()
371 return -ENOTSUP; in uart_nrfx_configure()
376 data->uart_config = *cfg; in uart_nrfx_configure()
385 struct uart_nrfx_data *data = dev->data; in uart_nrfx_config_get()
387 *cfg = data->uart_config; in uart_nrfx_config_get()
423 return -EBUSY; in uart_nrfx_tx()
444 return -EINVAL; in uart_nrfx_tx_abort()
473 return -ENOTSUP; in uart_nrfx_rx_enable()
477 return -EBUSY; in uart_nrfx_rx_enable()
505 err = -EACCES; in uart_nrfx_rx_buf_rsp()
507 err = -EBUSY; in uart_nrfx_rx_buf_rsp()
522 return -EFAULT; in uart_nrfx_rx_disable()
540 event.data.rx.buf = uart0_cb.rx_buffer; in rx_rdy_evt()
541 event.data.rx.len = rx_cnt - uart0_cb.rx_offset; in rx_rdy_evt()
542 event.data.rx.offset = uart0_cb.rx_offset; in rx_rdy_evt()
586 /* Byte received when receiving is disabled - data lost. */ in rx_isr()
621 /* Switch to secondary buffer. */ in rx_isr()
700 - uart0_cb.rx_offset, in error_isr()
701 .data.rx_stop.data.offset = uart0_cb.rx_offset, in error_isr()
711 * In nRF hardware RX timeout can occur only after stopping the peripheral,
720 if (uart0_cb.rx_counter - uart0_cb.rx_offset) { in rxto_isr()
791 while ((len - num_tx > 0) && in uart_nrfx_fifo_fill()
811 while ((size - num_rx > 0) && in uart_nrfx_fifo_read()
846 /* Due to HW limitation first TXDRDY interrupt shall be in uart_nrfx_irq_tx_enable()
989 const struct uart_nrfx_config *config = dev->config; in uart_nrfx_init()
990 struct uart_nrfx_data *data = dev->data; in uart_nrfx_init()
995 err = pinctrl_apply_state(config->pcfg, PINCTRL_STATE_DEFAULT); in uart_nrfx_init()
1001 err = uart_nrfx_configure(dev, &data->uart_config); in uart_nrfx_init()
1085 const struct uart_nrfx_config *config = dev->config; in uart_nrfx_pm_action()
1090 ret = pinctrl_apply_state(config->pcfg, PINCTRL_STATE_DEFAULT); in uart_nrfx_pm_action()
1103 ret = pinctrl_apply_state(config->pcfg, PINCTRL_STATE_SLEEP); in uart_nrfx_pm_action()
1109 return -ENOTSUP; in uart_nrfx_pm_action()