mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-12 15:45:49 +00:00
The driver was extended so that the tests/drivers/uart/uart_basic_api test case now passes. The following modifications were made for the following items of the test case: * test_uart_configure * test_uart_config_get The driver was missing the support to re-configure the UART at run-time as well as to obtain the current configuration at run-time via the .configure and .config_get hooks provided within the UART driver API. For the flow control setting, bit (mask) definitions were added for the Modem Control Register. Both the configuration get and set functions come with auxiliary functions that convert configuration register bit masks to the UART driver API's enumeration types and vice versa. For run-time configurability, the device's data struct is required un- conditionally, previously, it was only available whenever interrupt- driven mode was enabled. Consequently, the device initialization was simplified to a single call of the DEVICE_AND_API_INIT macro, as the existance of the device's data struct is now no longer conditional. * test_uart_fifo_fill For the user callback function of the test case to receive the initial 'Ready to TX' indication upon which the TX FIFO is filled, it is necessary that uart_xlnx_ps_irq_tx_enable also sets the TX FIFO empty bit in the Interrupt Enable Register. Consequently, the same modifi- cation applies to the irq_tx_disable function. * test_uart_fifo_read During inital device configuration, the RX FIFO interrupt trigger level has to be set to 1 byte for now, as the test case doesn't poll the incoming data in a while()-loop, therefore, it misses the CR/LF if more than one character is in the RX FIFO at the time of the interrupt and neither CR nor LF is the first character. Whenever the state of an interrupt is checked by the user callback function (uart_xlnx_ps_irq_tx_ready, uart_xlnx_ps_irq_rx_ready), the corresponding bits are cleared in the Interrupt Status Register, re-enabling interrupts generated by the corresponding source. Tested on QEMU (R5, A9) and actual Zynq7000 hardware. Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
Kconfig.altera_jtag | ||
Kconfig.cc13xx_cc26xx | ||
Kconfig.cc32xx | ||
Kconfig.cmsdk_apb | ||
Kconfig.esp32 | ||
Kconfig.gecko | ||
Kconfig.imx | ||
Kconfig.leuart_gecko | ||
Kconfig.litex | ||
Kconfig.mcux | ||
Kconfig.mcux_flexcomm | ||
Kconfig.mcux_lpsci | ||
Kconfig.mcux_lpuart | ||
Kconfig.miv | ||
Kconfig.msp432p4xx | ||
Kconfig.native_posix | ||
Kconfig.nrfx | ||
Kconfig.ns16550 | ||
Kconfig.nsim | ||
Kconfig.pl011 | ||
Kconfig.psoc6 | ||
Kconfig.rtt | ||
Kconfig.rv32m1_lpuart | ||
Kconfig.sam0 | ||
Kconfig.sifive | ||
Kconfig.stellaris | ||
Kconfig.stm32 | ||
Kconfig.uart_sam | ||
Kconfig.usart_sam | ||
Kconfig.xlnx | ||
leuart_gecko.c | ||
uart_altera_jtag_hal.c | ||
uart_cc13xx_cc26xx.c | ||
uart_cc32xx.c | ||
uart_cmsdk_apb.c | ||
uart_esp32.c | ||
uart_gecko.c | ||
uart_handlers.c | ||
uart_imx.c | ||
uart_liteuart.c | ||
uart_mcux_flexcomm.c | ||
uart_mcux_lpsci.c | ||
uart_mcux_lpuart.c | ||
uart_mcux.c | ||
uart_miv.c | ||
uart_msp432p4xx.c | ||
uart_native_posix.c | ||
uart_nrfx_uart.c | ||
uart_nrfx_uarte.c | ||
uart_ns16550_port_x.h | ||
uart_ns16550.c | ||
uart_ns16550.h | ||
uart_nsim.c | ||
uart_pl011.c | ||
uart_psoc6.c | ||
uart_rtt.c | ||
uart_rv32m1_lpuart.c | ||
uart_sam.c | ||
uart_sam0.c | ||
uart_sifive.c | ||
uart_stellaris.c | ||
uart_stm32.c | ||
uart_stm32.h | ||
uart_xlnx_ps.c | ||
usart_sam.c |