1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/uart.h) 4 5zephyr_library() 6zephyr_library_sources_ifdef(CONFIG_UART_ALTERA_JTAG uart_altera_jtag.c) 7zephyr_library_sources_ifdef(CONFIG_UART_ALTERA uart_altera.c) 8zephyr_library_sources_ifdef(CONFIG_UART_TELINK_B91 uart_b91.c) 9zephyr_library_sources_ifdef(CONFIG_UART_IMX uart_imx.c) 10zephyr_library_sources_ifdef(CONFIG_UART_ITE_IT8XXX2 uart_ite_it8xxx2.c) 11zephyr_library_sources_ifdef(CONFIG_UART_CC13XX_CC26XX uart_cc13xx_cc26xx.c) 12zephyr_library_sources_ifdef(CONFIG_UART_CC32XX uart_cc32xx.c) 13zephyr_library_sources_ifdef(CONFIG_UART_CMSDK_APB uart_cmsdk_apb.c) 14zephyr_library_sources_ifdef(CONFIG_UART_ESP32 uart_esp32.c) 15zephyr_library_sources_ifdef(CONFIG_SERIAL_ESP32_USB serial_esp32_usb.c) 16zephyr_library_sources_ifdef(CONFIG_UART_SIFIVE uart_sifive.c) 17zephyr_library_sources_ifdef(CONFIG_UART_GECKO uart_gecko.c) 18zephyr_library_sources_ifdef(CONFIG_LEUART_GECKO leuart_gecko.c) 19zephyr_library_sources_ifdef(CONFIG_UART_LPC11U6X uart_lpc11u6x.c) 20zephyr_library_sources_ifdef(CONFIG_UART_MCUX uart_mcux.c) 21zephyr_library_sources_ifdef(CONFIG_UART_MCUX_FLEXCOMM uart_mcux_flexcomm.c) 22zephyr_library_sources_ifdef(CONFIG_UART_MCUX_IUART uart_mcux_iuart.c) 23zephyr_library_sources_ifdef(CONFIG_UART_MCUX_LPUART uart_mcux_lpuart.c) 24zephyr_library_sources_ifdef(CONFIG_UART_MCUX_LPSCI uart_mcux_lpsci.c) 25zephyr_library_sources_ifdef(CONFIG_UART_MIV uart_miv.c) 26zephyr_library_sources_ifdef(CONFIG_UART_MSP432P4XX uart_msp432p4xx.c) 27zephyr_library_sources_ifdef(CONFIG_UART_NS16550 uart_ns16550.c) 28zephyr_library_sources_ifdef(CONFIG_UART_NRFX_UART uart_nrfx_uart.c) 29if (CONFIG_UART_NRFX_UARTE) 30 if (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM) 31 zephyr_library_sources(uart_nrfx_uarte.c) 32 else() 33 zephyr_library_sources(uart_nrfx_uarte2.c) 34 endif() 35endif() 36zephyr_library_sources_ifdef(CONFIG_UART_NUMICRO uart_numicro.c) 37zephyr_library_sources_ifdef(CONFIG_UART_SAM uart_sam.c) 38zephyr_library_sources_ifdef(CONFIG_USART_SAM usart_sam.c) 39zephyr_library_sources_ifdef(CONFIG_UART_STELLARIS uart_stellaris.c) 40zephyr_library_sources_ifdef(CONFIG_UART_STM32 uart_stm32.c) 41zephyr_library_sources_ifdef(CONFIG_UART_SAM0 uart_sam0.c) 42zephyr_library_sources_ifdef(CONFIG_UART_PSOC6 uart_psoc6.c) 43zephyr_library_sources_ifdef(CONFIG_UART_PL011 uart_pl011.c) 44zephyr_library_sources_ifdef(CONFIG_UART_QUICKLOGIC_USBSERIALPORT_S3B uart_ql_usbserialport_s3b.c) 45zephyr_library_sources_ifdef(CONFIG_UART_RV32M1_LPUART uart_rv32m1_lpuart.c) 46zephyr_library_sources_ifdef(CONFIG_UART_RPI_PICO_PIO uart_rpi_pico_pio.c) 47zephyr_library_sources_ifdef(CONFIG_UART_LITEX uart_litex.c) 48zephyr_library_sources_ifdef(CONFIG_UART_RTT_DRIVER uart_rtt.c) 49zephyr_library_sources_ifdef(CONFIG_UART_XLNX_PS uart_xlnx_ps.c) 50zephyr_library_sources_ifdef(CONFIG_UART_XLNX_UARTLITE uart_xlnx_uartlite.c) 51zephyr_library_sources_ifdef(CONFIG_UART_XMC4XXX uart_xmc4xxx.c) 52zephyr_library_sources_ifdef(CONFIG_UART_NPCX uart_npcx.c) 53zephyr_library_sources_ifdef(CONFIG_UART_APBUART uart_apbuart.c) 54zephyr_library_sources_ifdef(CONFIG_USB_CDC_ACM ${ZEPHYR_BASE}/misc/empty_file.c) 55zephyr_library_sources_ifdef(CONFIG_UART_RCAR uart_rcar.c) 56zephyr_library_sources_ifdef(CONFIG_UART_XEC uart_mchp_xec.c) 57zephyr_library_sources_ifdef(CONFIG_UART_NEORV32 uart_neorv32.c) 58zephyr_library_sources_ifdef(CONFIG_USART_GD32 usart_gd32.c) 59zephyr_library_sources_ifdef(CONFIG_UART_XEN_HVC uart_hvc_xen.c) 60zephyr_library_sources_ifdef(CONFIG_UART_XEN_HVC_CONSOLEIO uart_hvc_xen_consoleio.c) 61zephyr_library_sources_ifdef(CONFIG_UART_INFINEON_CAT1 uart_ifx_cat1.c) 62zephyr_library_sources_ifdef(CONFIG_UART_PIPE uart_pipe.c) 63zephyr_library_sources_ifdef(CONFIG_UART_SMARTBOND uart_smartbond.c) 64zephyr_library_sources_ifdef(CONFIG_UART_NXP_S32_LINFLEXD uart_nxp_s32_linflexd.c) 65zephyr_library_sources_ifdef(CONFIG_UART_CDNS uart_cdns.c) 66zephyr_library_sources_ifdef(CONFIG_UART_OPENTITAN uart_opentitan.c) 67zephyr_library_sources_ifdef(CONFIG_UART_HOSTLINK uart_hostlink.c) 68zephyr_library_sources_ifdef(CONFIG_UART_EMUL uart_emul.c) 69zephyr_library_sources_ifdef(CONFIG_UART_NUMAKER uart_numaker.c) 70zephyr_library_sources_ifdef(CONFIG_UART_EFINIX_SAPPIHIRE uart_efinix_sapphire.c) 71zephyr_library_sources_ifdef(CONFIG_UART_SEDI uart_sedi.c) 72zephyr_library_sources_ifdef(CONFIG_UART_MAX32 uart_max32.c) 73zephyr_library_sources_ifdef(CONFIG_UART_BCM2711_MU uart_bcm2711.c) 74zephyr_library_sources_ifdef(CONFIG_UART_INTEL_LW uart_intel_lw.c) 75zephyr_library_sources_ifdef(CONFIG_UART_RENESAS_RA uart_renesas_ra.c) 76zephyr_library_sources_ifdef(CONFIG_UART_ENE_KB1200 uart_ene_kb1200.c) 77zephyr_library_sources_ifdef(CONFIG_UART_RZT2M uart_rzt2m.c) 78zephyr_library_sources_ifdef(CONFIG_UART_RA8_SCI_B uart_renesas_ra8_sci_b.c) 79zephyr_library_sources_ifdef(CONFIG_USERSPACE uart_handlers.c) 80 81if(CONFIG_UART_NATIVE_POSIX) 82 zephyr_library_compile_definitions(NO_POSIX_CHEATS) 83 zephyr_library_sources(uart_native_ptty.c) 84 if (CONFIG_NATIVE_APPLICATION) 85 zephyr_library_sources(uart_native_ptty_bottom.c) 86 else() 87 target_sources(native_simulator INTERFACE uart_native_ptty_bottom.c) 88 endif() 89endif() 90 91if(CONFIG_UART_NATIVE_TTY) 92 zephyr_library_compile_definitions(NO_POSIX_CHEATS) 93 zephyr_library_sources(uart_native_tty.c) 94 if (CONFIG_NATIVE_APPLICATION) 95 zephyr_library_sources(uart_native_tty_bottom.c) 96 else() 97 target_sources(native_simulator INTERFACE uart_native_tty_bottom.c) 98 endif() 99endif() 100 101zephyr_library_sources_ifdef(CONFIG_UART_BT uart_bt.c) 102 103zephyr_library_sources_ifdef(CONFIG_SERIAL_TEST serial_test.c) 104zephyr_library_sources_ifdef(CONFIG_UART_ASYNC_RX_HELPER uart_async_rx.c) 105zephyr_library_sources_ifdef(CONFIG_UART_ASYNC_TO_INT_DRIVEN_API uart_async_to_irq.c) 106