mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-29 16:31:18 +01:00
This allows I2C emulation on native architecture in the same way than periph_gpio_mock. All I2C functions from this driver are set as weak to be easily overridden in each application. Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
64 lines
1.4 KiB
Makefile
64 lines
1.4 KiB
Makefile
ifeq ($(OS),Linux)
|
|
ifneq (,$(filter periph_gpio,$(USEMODULE)))
|
|
ifeq (,$(filter periph_gpio_mock,$(USEMODULE)))
|
|
USEMODULE += periph_gpio_linux
|
|
endif
|
|
endif
|
|
ifneq (,$(filter periph_i2c,$(USEMODULE)))
|
|
USEMODULE += periph_i2c_mock
|
|
endif
|
|
ifneq (,$(filter periph_spi,$(USEMODULE)))
|
|
USEMODULE += periph_spidev_linux
|
|
endif
|
|
else
|
|
ifneq (,$(filter periph_gpio,$(USEMODULE)))
|
|
USEMODULE += periph_gpio_mock
|
|
endif
|
|
ifneq (,$(filter periph_i2c,$(USEMODULE)))
|
|
USEMODULE += periph_i2c_mock
|
|
endif
|
|
endif
|
|
|
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
|
USEMODULE += stdio_native
|
|
endif
|
|
|
|
ifneq (,$(filter periph_rtc,$(USEMODULE)))
|
|
USEMODULE += ztimer
|
|
USEMODULE += ztimer_msec
|
|
endif
|
|
|
|
ifneq (,$(filter eui_provider,$(USEMODULE)))
|
|
USEMODULE += native_cli_eui_provider
|
|
endif
|
|
|
|
ifneq (,$(filter native_cli_eui_provider,$(USEMODULE)))
|
|
USEMODULE += l2util
|
|
endif
|
|
|
|
ifneq (,$(filter socket_zep,$(USEMODULE)))
|
|
USEMODULE += iolist
|
|
USEMODULE += checksum
|
|
USEMODULE += random
|
|
USEMODULE += ieee802154
|
|
ifneq (,$(filter netdev,$(USEMODULE)))
|
|
USEMODULE += netdev_ieee802154_submac
|
|
USEMODULE += netdev_ieee802154_submac_soft_ack
|
|
endif
|
|
endif
|
|
|
|
ifneq (,$(filter netdev_tap,$(USEMODULE)))
|
|
USEMODULE += netdev_new_api
|
|
endif
|
|
|
|
ifneq (,$(filter libc_gettimeofday,$(USEMODULE)))
|
|
USEMODULE += ztimer64_usec
|
|
endif
|
|
|
|
USEMODULE += periph
|
|
|
|
# UART is needed by startup.c
|
|
USEMODULE += periph_uart
|
|
|
|
USEMODULE += fdcan
|