1add_subdirectory(source/ti/devices)
2
3if(CONFIG_SIMPLELINK_HOST_DRIVER)
4  zephyr_include_directories(
5    .
6    source
7    kernel/zephyr/dpl
8    source/ti/drivers/net/wifi/porting
9    )
10  zephyr_compile_definitions(
11    SL_SUPPORT_IPV6
12    SL_PLATFORM_MULTI_THREADED
13    )
14endif()
15
16if(CONFIG_HAS_CC3220SDK)
17  if(CONFIG_SIMPLELINK_HOST_DRIVER)
18    zephyr_library()
19    zephyr_library_compile_definitions(${COMPILER})
20    zephyr_library_sources(
21      source/ti/drivers/SPI.c
22      source/ti/drivers/spi/SPICC32XXDMA.c
23      source/ti/drivers/dma/UDMACC32XX.c
24      source/ti/drivers/power/PowerCC32XX.c
25      source/ti/drivers/utils/List.c
26      source/ti/drivers/net/wifi/source/driver.c
27      source/ti/drivers/net/wifi/source/device.c
28      source/ti/drivers/net/wifi/source/flowcont.c
29      source/ti/drivers/net/wifi/source/fs.c
30      source/ti/drivers/net/wifi/source/netapp.c
31      source/ti/drivers/net/wifi/source/netcfg.c
32      source/ti/drivers/net/wifi/source/netutil.c
33      source/ti/drivers/net/wifi/source/nonos.c
34      source/ti/drivers/net/wifi/source/spawn.c
35      source/ti/drivers/net/wifi/source/wlan.c
36      source/ti/drivers/net/wifi/porting/CC3220SF_LAUNCHXL.c
37      source/ti/drivers/net/wifi/porting/cc_pal.c
38      source/ti/drivers/net/wifi/eventreg.c
39      source/ti/drivers/net/wifi/source/sl_socket.c
40      source/ti/drivers/net/wifi/slnetif/slnetifwifi.c
41      source/ti/net/slnetif.c
42      source/ti/net/slnetsock.c
43      source/ti/net/slnetutils.c
44
45      source/ti/devices/cc32xx/driverlib/timer.c
46      source/ti/devices/cc32xx/driverlib/udma.c
47
48      kernel/zephyr/dpl/dpl.c
49      kernel/zephyr/dpl/MutexP_zephyr.c
50      kernel/zephyr/dpl/SemaphoreP_zephyr.c
51      kernel/zephyr/dpl/ClockP_zephyr.c
52      kernel/zephyr/dpl/HwiP_zephyr.c
53      )
54
55    set_source_files_properties(source/ti/drivers/net/wifi/source/driver.c
56      PROPERTIES COMPILE_DEFINITIONS "__LINUX_ERRNO_EXTENSIONS__;${COMPILER}" )
57    set_source_files_properties(source/ti/drivers/net/wifi/source/driver.c
58      PROPERTIES COMPILE_FLAGS -Wno-incompatible-pointer-types) # driver.c warns on incompatible-pointer-types
59  endif()
60
61elseif(CONFIG_HAS_CC13X2_CC26X2_SDK OR CONFIG_HAS_CC13X2X7_CC26X2X7_SDK)
62
63  if(CONFIG_SOC_CC1352R OR CONFIG_SOC_CC1352P)
64    zephyr_compile_definitions(DeviceFamily_CC13X2 ${COMPILER})
65  elseif(CONFIG_SOC_CC1352R7 OR CONFIG_SOC_CC1352P7)
66    zephyr_compile_definitions(DeviceFamily_CC13X2X7 ${COMPILER})
67  elseif(CONFIG_SOC_CC2652R OR CONFIG_SOC_CC2652P)
68    zephyr_compile_definitions(DeviceFamily_CC26X2 ${COMPILER})
69  endif()
70
71  zephyr_include_directories(
72    .
73    source
74    )
75
76  zephyr_library()
77  zephyr_library_compile_definitions(${COMPILER})
78  zephyr_library_sources(
79    source/ti/drivers/power/PowerCC26X2.c
80    source/ti/drivers/power/PowerCC26X2_calibrateRCOSC.c
81    source/ti/drivers/utils/List.c
82    source/ti/drivers/rf/RFCC26X2_multiMode.c
83    source/ti/drivers/temperature/TemperatureCC26X2.c
84
85    kernel/zephyr/dpl/config.c
86    kernel/zephyr/dpl/ClockP_zephyr.c
87    kernel/zephyr/dpl/HwiP_zephyr.c
88    kernel/zephyr/dpl/SwiP_zephyr.c
89    kernel/zephyr/dpl/SemaphoreP_zephyr.c
90    kernel/zephyr/dpl/QueueP_zephyr.c
91    )
92
93elseif(CONFIG_HAS_MSP432P4XXSDK)
94  zephyr_include_directories(
95    source
96    )
97endif()
98