Home
last modified time | relevance | path

Searched refs:uart_dev (Results 1 – 24 of 24) sorted by relevance

/Zephyr-Core-2.7.6/drivers/modem/
Dmodem_receiver.c41 if (contexts[i] && contexts[i]->uart_dev == dev) { in context_from_dev()
87 __ASSERT(ctx->uart_dev, "invalid ctx device"); in mdm_receiver_flush()
89 while (uart_fifo_read(ctx->uart_dev, &c, 1) > 0) { in mdm_receiver_flush()
104 static void mdm_receiver_isr(const struct device *uart_dev, void *user_data) in mdm_receiver_isr() argument
113 ctx = context_from_dev(uart_dev); in mdm_receiver_isr()
119 while (uart_irq_update(ctx->uart_dev) && in mdm_receiver_isr()
120 uart_irq_rx_ready(ctx->uart_dev)) { in mdm_receiver_isr()
121 rx = uart_fifo_read(ctx->uart_dev, read_buf, sizeof(read_buf)); in mdm_receiver_isr()
148 uart_irq_rx_disable(ctx->uart_dev); in mdm_receiver_setup()
149 uart_irq_tx_disable(ctx->uart_dev); in mdm_receiver_setup()
[all …]
Dmodem_receiver.h25 const struct device *uart_dev; member
90 const struct device *uart_dev,
Dmodem_iface_uart.c50 static void modem_iface_uart_isr(const struct device *uart_dev, in modem_iface_uart_isr() argument
63 ctx = modem_context_from_iface_dev(uart_dev); in modem_iface_uart_isr()
Dmodem_shell.c43 #define UART_DEV_NAME(ctx_) (ctx_->uart_dev->name)
Dhl7800.c4377 uart_irq_rx_disable(ictx.mdm_ctx.uart_dev); in shutdown_uart()
4378 rc = pm_device_state_set(ictx.mdm_ctx.uart_dev, in shutdown_uart()
4395 rc = pm_device_state_set(ictx.mdm_ctx.uart_dev, in power_on_uart()
4400 uart_irq_rx_enable(ictx.mdm_ctx.uart_dev); in power_on_uart()
/Zephyr-Core-2.7.6/tests/drivers/uart/uart_async_api/src/
Dtest_uart_async.c16 ZTEST_BMEM static const struct device *uart_dev; variable
20 uart_dev = device_get_binding(UART_DEVICE_NAME); in init_test()
28 uart_dev); in set_permissions()
63 uart_callback_set(uart_dev, in test_single_read_setup()
76 uart_rx_enable(uart_dev, rx_buf, 10, 50); in test_single_read()
80 uart_tx(uart_dev, tx_buf, sizeof(tx_buf), 100); in test_single_read()
89 uart_tx(uart_dev, tx_buf, sizeof(tx_buf), 100); in test_single_read()
111 void test_chained_read_callback(const struct device *uart_dev, in test_chained_read_callback() argument
125 uart_rx_buf_rsp(uart_dev, in test_chained_read_callback()
130 uart_rx_buf_rsp(uart_dev, in test_chained_read_callback()
[all …]
/Zephyr-Core-2.7.6/tests/drivers/uart/uart_basic_api/src/
Dtest_uart_fifo.c95 const struct device *uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in test_fifo_read() local
97 if (!device_is_ready(uart_dev)) { in test_fifo_read()
103 uart_irq_callback_set(uart_dev, uart_fifo_callback); in test_fifo_read()
107 uart_irq_rx_enable(uart_dev); in test_fifo_read()
118 uart_irq_rx_disable(uart_dev); in test_fifo_read()
125 const struct device *uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in test_fifo_fill() local
127 if (!device_is_ready(uart_dev)) { in test_fifo_fill()
135 uart_irq_callback_set(uart_dev, uart_fifo_callback); in test_fifo_fill()
139 uart_irq_tx_enable(uart_dev); in test_fifo_fill()
144 uart_irq_tx_disable(uart_dev); in test_fifo_fill()
Dtest_uart_poll.c14 const struct device *uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in test_poll_in() local
16 if (!device_is_ready(uart_dev)) { in test_poll_in()
25 while (uart_poll_in(uart_dev, &recv_char) < 0) { in test_poll_in()
43 const struct device *uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in test_poll_out() local
45 if (!device_is_ready(uart_dev)) { in test_poll_out()
52 uart_poll_out(uart_dev, poll_data[i]); in test_poll_out()
Dtest_uart_config.c39 const struct device *uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in test_configure() local
41 if (!device_is_ready(uart_dev)) { in test_configure()
47 int ret = uart_configure(uart_dev, &uart_cfg); in test_configure()
61 const struct device *uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in test_config_get() local
63 if (!device_is_ready(uart_dev)) { in test_config_get()
72 int ret = uart_configure(uart_dev, &uart_cfg); in test_config_get()
83 ret = uart_config_get(uart_dev, &uart_cfg_check); in test_config_get()
Dtest_uart_pending.c96 const struct device *uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in test_pending() local
98 if (!device_is_ready(uart_dev)) { in test_pending()
106 uart_irq_callback_set(uart_dev, uart_pending_callback); in test_pending()
113 uart_irq_tx_disable(uart_dev); in test_pending()
119 uart_irq_rx_enable(uart_dev); in test_pending()
/Zephyr-Core-2.7.6/subsys/debug/gdbstub/
Dgdbstub_backend_serial.c11 static const struct device *uart_dev; variable
24 if (uart_dev == NULL) { in z_gdb_backend_init()
25 uart_dev = device_get_binding( in z_gdb_backend_init()
28 __ASSERT(uart_dev != NULL, "Could not get uart device"); in z_gdb_backend_init()
30 ret = uart_configure(uart_dev, &uart_cfg); in z_gdb_backend_init()
39 uart_poll_out(uart_dev, ch); in z_gdb_putchar()
46 while (uart_poll_in(uart_dev, &ch) < 0) { in z_gdb_getchar()
/Zephyr-Core-2.7.6/tests/drivers/uart/uart_mix_fifo_poll/src/
Dmain.c51 static const struct device *uart_dev; variable
91 err = uart_rx_enable(uart_dev, async_rx_buf, in counter_top_handler()
97 uart_irq_rx_enable(uart_dev); in counter_top_handler()
99 uart_irq_rx_disable(uart_dev); in counter_top_handler()
106 while (uart_poll_in(uart_dev, &c) >= 0) { in counter_top_handler()
121 uart_dev = device_get_binding(UART_DEVICE_NAME); in init_test()
122 zassert_true(uart_dev != NULL, NULL); in init_test()
124 if (uart_callback_set(uart_dev, async_callback, NULL) == 0) { in init_test()
128 int_driven = uart_irq_tx_complete(uart_dev) >= 0; in init_test()
130 uart_irq_callback_set(uart_dev, int_driven_callback); in init_test()
[all …]
/Zephyr-Core-2.7.6/subsys/console/
Dgetchar.c52 const struct device *uart_dev; in console_init() local
55 uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in console_init()
56 if (!device_is_ready(uart_dev)) { in console_init()
60 ret = tty_init(&console_serial, uart_dev); in console_init()
69 (const struct uart_driver_api *)uart_dev->api; in console_init()
Dtty.c96 uart_irq_tx_enable(tty->uart_dev); in tty_putchar()
111 uart_poll_out(tty->uart_dev, *p++); in tty_write()
171 res = uart_poll_in(tty->uart_dev, &c); in tty_read_unbuf()
241 int tty_init(struct tty_serial *tty, const struct device *uart_dev) in tty_init() argument
243 if (!uart_dev) { in tty_init()
247 tty->uart_dev = uart_dev; in tty_init()
260 uart_irq_callback_user_data_set(uart_dev, tty_uart_isr, tty); in tty_init()
267 uart_irq_rx_disable(tty->uart_dev); in tty_set_rx_buf()
274 uart_irq_rx_enable(tty->uart_dev); in tty_set_rx_buf()
282 uart_irq_tx_disable(tty->uart_dev); in tty_set_tx_buf()
/Zephyr-Core-2.7.6/subsys/logging/
Dlog_backend_uart.c22 static const struct device *uart_dev; variable
36 uart_poll_out(uart_dev, c); in char_out()
41 uart_poll_out(uart_dev, c); in char_out()
43 uart_poll_out(uart_dev, data[i]); in char_out()
78 uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); in log_backend_uart_init()
79 __ASSERT_NO_MSG(device_is_ready(uart_dev)); in log_backend_uart_init()
88 uart_poll_out(uart_dev, LOG_HEX_SEP[i]); in log_backend_uart_init()
/Zephyr-Core-2.7.6/drivers/sensor/pms7003/
Dpms7003.c31 const struct device *uart_dev; member
120 if (uart_wait_for(drv_data->uart_dev, pms7003_start_bytes, in pms7003_sample_fetch()
127 if (uart_read_bytes(drv_data->uart_dev, pms7003_receive_buffer, 30, in pms7003_sample_fetch()
175 drv_data->uart_dev = device_get_binding(DT_INST_BUS_LABEL(0)); in pms7003_init()
177 if (!drv_data->uart_dev) { in pms7003_init()
/Zephyr-Core-2.7.6/include/console/
Dtty.h19 const struct device *uart_dev; member
52 int tty_init(struct tty_serial *tty, const struct device *uart_dev);
/Zephyr-Core-2.7.6/samples/net/gsm_modem/src/
Dmain.c95 const struct device *uart_dev = in main() local
102 DT_BUS_LABEL(DT_INST(0, zephyr_gsm_ppp)), uart_dev, in main()
/Zephyr-Core-2.7.6/samples/subsys/mgmt/updatehub/src/
Dmain.c141 const struct device *uart_dev = in main() local
145 DT_BUS_LABEL(DT_INST(0, zephyr_gsm_ppp)), uart_dev); in main()
/Zephyr-Core-2.7.6/drivers/serial/
Duart_stm32.h67 const struct device *uart_dev; member
Duart_stm32.c828 data->async_cb(data->uart_dev, event, data->async_user_data); in async_user_callback()
1114 const struct device *uart_dev = user_data; in uart_stm32_dma_tx_cb() local
1115 struct uart_stm32_data *data = DEV_DATA(uart_dev); in uart_stm32_dma_tx_cb()
1120 uart_stm32_dma_tx_disable(uart_dev); in uart_stm32_dma_tx_cb()
1170 const struct device *uart_dev = user_data; in uart_stm32_dma_rx_cb() local
1171 struct uart_stm32_data *data = DEV_DATA(uart_dev); in uart_stm32_dma_rx_cb()
1192 uart_stm32_dma_replace_buffer(uart_dev); in uart_stm32_dma_rx_cb()
1352 const struct device *dev = data->uart_dev; in uart_stm32_async_rx_timeout()
1370 const struct device *dev = data->uart_dev; in uart_stm32_async_tx_timeout()
1394 data->uart_dev = dev; in uart_stm32_async_init()
/Zephyr-Core-2.7.6/samples/net/wpan_serial/src/
Dmain.c63 static const struct device *uart_dev; variable
372 wrote = uart_fifo_fill(uart_dev, data, len); in try_write()
560 uart_dev = dev; in main()
/Zephyr-Core-2.7.6/drivers/wifi/eswifi/
Deswifi_bus_uart.c57 static void eswifi_iface_uart_isr(const struct device *uart_dev, in eswifi_iface_uart_isr() argument
/Zephyr-Core-2.7.6/doc/guides/dts/
Dhowtos.rst108 const struct device *uart_dev = device_get_binding(DT_LABEL(MY_SERIAL));
110 You can then use ``uart_dev`` with :ref:`uart_api` API functions like
122 const struct device *uart_dev = DEVICE_DT_GET(MY_SERIAL);
124 if (!device_is_ready(uart_dev)) {
143 const struct device *uart_dev = device_get_binding(DT_LABEL(MY_SERIAL));
149 devicetree. If you don't see the ``#error`` but ``uart_dev`` is NULL, then