zephyr/drivers/ethernet/CMakeLists.txt
Paul Sokolovsky 483b9d609c drivers: eth_smsc911x: Add driver for SMSC9118 aka LAN9118 chip
As emulated by QEMU. SMSC9118 is compatible with SMSC9220 as used in
ARM MPS2 board, as well as SMSC9115/6/7/etc. devices.

Portions of the code are based on mbedOS code from its
targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/device/drivers/smsc9220_eth.c

eth_smsc9220_priv.h originally comes from Arm mbedOS file:

targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/device/drivers/smsc9220_eth.h

augmented with struct & defines from:

targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/device/CM3DS.h

and renamed as eth_smsc911x_priv.h to follow Zephyr conventions.

Then, following changes applied:

Changes to build under Zephyr, changes to use symbolic constants
and field access helpers, typo fixes, etc.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2019-01-19 11:59:29 -05:00

27 lines
876 B
CMake

zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/l2)
zephyr_sources_ifdef(CONFIG_ETH_SAM_GMAC
eth_sam_gmac.c
phy_sam_gmac.c
)
zephyr_sources_ifdef(CONFIG_ETH_STELLARIS eth_stellaris.c)
zephyr_sources_ifdef(CONFIG_ETH_DW eth_dw.c)
zephyr_sources_ifdef(CONFIG_ETH_E1000 eth_e1000.c)
zephyr_sources_ifdef(CONFIG_ETH_ENC28J60 eth_enc28j60.c)
zephyr_sources_ifdef(CONFIG_ETH_MCUX eth_mcux.c)
zephyr_sources_ifdef(CONFIG_ETH_SMSC911X eth_smsc911x.c)
zephyr_sources_ifdef(CONFIG_ETH_STM32_HAL eth_stm32_hal.c)
if(CONFIG_ETH_NATIVE_POSIX)
zephyr_library()
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/l2)
zephyr_library_compile_definitions(NO_POSIX_CHEATS)
zephyr_library_compile_definitions(_BSD_SOURCE)
zephyr_library_compile_definitions(_DEFAULT_SOURCE)
zephyr_library_sources(
eth_native_posix.c
eth_native_posix_adapt.c
)
endif()