1# SPDX-License-Identifier: Apache-2.0
2#
3# Copyright (c) 2020 Linumiz
4# Author: Parthiban Nallathambi <parthiban@linumiz.com>
5
6if(CONFIG_CPU_CORTEX_M4)
7  zephyr_compile_definitions( -DCORE_CM4 )
8endif()
9
10zephyr_include_directories(inc)
11
12# TODO: conditional include for PIO & SCU after zephyr support
13zephyr_sources(src/xmc_usic.c)
14zephyr_sources(src/xmc4_scu.c)
15zephyr_sources(src/xmc_gpio.c)
16zephyr_sources(src/xmc4_gpio.c)
17zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_UART src/xmc_uart.c)
18zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_ERU  src/xmc_eru.c src/xmc4_eru.c)
19zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_ACMP  src/xmc_acmp.c)
20zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_CAN  src/xmc_can.c)
21zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_CCU src/xmc_ccu4.c src/xmc_ccu8.c)
22zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_DAC  src/xmc_dac.c)
23zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_DMA src/xmc_dma.c)
24zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_DSD  src/xmc_dsd.c)
25zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_EBU  src/xmc_ebu.c)
26zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_ECAT  src/xmc_ecat.c)
27zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_ETH  src/xmc_eth_mac.c)
28zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_ETH_PHY_DP83848  src/xmc_eth_phy_dp83848.c)
29zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_ETH_PHY_KSZ8031RNL src/xmc_eth_phy_ksz8031rnl.c)
30zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_ETH_PHY_KSZ8081RNB src/xmc_eth_phy_ksz8081rnb.c)
31zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_FCE src/xmc_fce.c)
32zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_FLASH  src/xmc4_flash.c)
33zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_I2C  src/xmc_i2c.c)
34zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_I2S src/xmc_i2s.c)
35zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_LEDTS src/xmc_ledts.c)
36zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_POSIF src/xmc_posif.c)
37zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_PRNG src/xmc_prng.c)
38zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_RTC  src/xmc_rtc.c src/xmc4_rtc.c)
39zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_SDMMC src/xmc_sdmmc.c)
40zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_SPI  src/xmc_spi.c)
41zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_USBD src/xmc_usbd.c)
42zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_USBH src/xmc_usbh.c)
43zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_VADC src/xmc_vadc.c)
44zephyr_sources_ifdef(CONFIG_HAS_XMCLIB_WDT src/xmc_wdt.c)
45