zephyr/drivers/serial
Paul Sokolovsky 57286afdd6 drivers: uart: Allow to pass arbitrary user data to irq callback
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>
2018-08-02 19:20:12 +02:00
..
CMakeLists.txt drivers: serial: nrf: Adding UARTE driver for the nRFx family 2018-07-11 10:03:03 +02:00
Kconfig drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.altera_jtag drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.cc32xx drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.cmsdk_apb drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.esp32 drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.fe310 drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.gecko Kconfig: Clean up some symbol definitions 2018-08-01 12:47:17 -04:00
Kconfig.imx drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.mcux drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.mcux_lpc_usart drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.mcux_lpsci drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.mcux_lpuart drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.miv drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.msp432p4xx drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.nrfx drivers: serial: nrf: Adding UARTE driver for the nRFx family 2018-07-11 10:03:03 +02:00
Kconfig.ns16550 drivers/serial: ns16550: extend to support 4 ports 2018-07-20 14:11:33 -04:00
Kconfig.nsim drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.qmsi drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.riscv_qemu drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.sam0 drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.stellaris drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.stm32 drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.uart_sam drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.usart_sam drivers: ethernet: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
uart_altera_jtag_hal.c drivers: serial: Add Altera shim driver for JTAG UART soft IP 2017-11-17 07:46:40 -05:00
uart_cc32xx.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_cmsdk_apb.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_esp32.c esp32: Prefix ROM routines with esp32_rom_ 2017-10-09 20:53:22 -04:00
uart_fe310.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_gecko.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_handlers.c drivers: serial: Fix syntax error 2018-06-29 10:18:48 +02:00
uart_imx.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_mcux_lpsci.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_mcux_lpuart.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_mcux.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_miv.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_msp432p4xx.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_nrfx_uart.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_nrfx_uarte.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_ns16550.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_ns16550.h
uart_nsim.c drivers: serial: add virtual uart driver for nsim 2018-07-10 19:05:13 -04:00
uart_qmsi.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_riscv_qemu.c
uart_sam0.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_sam.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_stellaris.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_stm32.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
uart_stm32.h drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00
usart_mcux_lpc.c ext: mcux: Reorganize imported drivers into soc family subfolders 2018-04-24 07:55:48 -05:00
usart_sam.c drivers: uart: Allow to pass arbitrary user data to irq callback 2018-08-02 19:20:12 +02:00