mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-01 12:32:44 +00:00
Zephyr UART drivers offer very low-level functionality. Oftentimes, it would be useful to provide higher-level wrappers around UART device which would offer additional functionality. However, UART driver irq callback routine receives just a pointer to (low-level) UART device, and it's not possible to get to a wrapper structure (without introducing expensive external mapping structures). This is an indirect reason why the current UARt wrappers - uart_pipe, console - are instantiated statically just for one underlying UART device and cannot be reused for multiple devices. Solve this by allowing to pass an arbitrary user data to irq callback, set by new uart_irq_callback_user_data_set() function. Existing uart_irq_callback_set() keeps setting a callback which will receive pointer to the device. While public API maintains compatibility, drivers themselves need to be updated to support arbitrary user data storage/passing (as legacy uart_irq_callback_set() functionality is now implemented in terms of it). Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
Kconfig.altera_jtag | ||
Kconfig.cc32xx | ||
Kconfig.cmsdk_apb | ||
Kconfig.esp32 | ||
Kconfig.fe310 | ||
Kconfig.gecko | ||
Kconfig.imx | ||
Kconfig.mcux | ||
Kconfig.mcux_lpc_usart | ||
Kconfig.mcux_lpsci | ||
Kconfig.mcux_lpuart | ||
Kconfig.miv | ||
Kconfig.msp432p4xx | ||
Kconfig.nrfx | ||
Kconfig.ns16550 | ||
Kconfig.nsim | ||
Kconfig.qmsi | ||
Kconfig.riscv_qemu | ||
Kconfig.sam0 | ||
Kconfig.stellaris | ||
Kconfig.stm32 | ||
Kconfig.uart_sam | ||
Kconfig.usart_sam | ||
uart_altera_jtag_hal.c | ||
uart_cc32xx.c | ||
uart_cmsdk_apb.c | ||
uart_esp32.c | ||
uart_fe310.c | ||
uart_gecko.c | ||
uart_handlers.c | ||
uart_imx.c | ||
uart_mcux_lpsci.c | ||
uart_mcux_lpuart.c | ||
uart_mcux.c | ||
uart_miv.c | ||
uart_msp432p4xx.c | ||
uart_nrfx_uart.c | ||
uart_nrfx_uarte.c | ||
uart_ns16550.c | ||
uart_ns16550.h | ||
uart_nsim.c | ||
uart_qmsi.c | ||
uart_riscv_qemu.c | ||
uart_sam.c | ||
uart_sam0.c | ||
uart_stellaris.c | ||
uart_stm32.c | ||
uart_stm32.h | ||
usart_mcux_lpc.c | ||
usart_sam.c |