1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 23:41:18 +01:00
Marian Buschsieweke 780a02ef6c
tests/drivers/candev: minor cleanup
- Do not hard code the number of the CAN interface to use. (This
  also allows specifying it via make command line / environment
  variable.)
- Make less use of preprocessor and rely on compiler to eliminate dead
  branches and unused variables.

Co-authored-by: crasbe <crasbe@gmail.com>
2025-04-06 20:19:16 +02:00

29 lines
777 B
Makefile

include ../Makefile.drivers_common
FEATURES_OPTIONAL += periph_can
USEMODULE += shell
USEMODULE += can
USEMODULE += isrpipe
# The number of the CAN bus to use can be controlled via environment
# variable CAN_DEV:
CAN_DEV ?= 0
CFLAGS += -DCONFIG_CAN_DEV=$(CAN_DEV)
include $(RIOTBASE)/Makefile.include
# Loop delay
ifneq (,$(filter fdcan,$(USEMODULE)))
ifneq (1,$(RIOT_CI_BUILD))
# Check your CAN transceiver datasheet to apply the good loop delay in nanoseconds.
# This configuration is mandatory if you are using CAN FD with bitrate switching.
# Can be configured here or through Kconfig
#CFLAGS += -DCONFIG_FDCAN_DEVICE_TRANSCEIVER_LOOP_DELAY=0
# Allow only a default value for CI
else
CFLAGS += -DCONFIG_FDCAN_DEVICE_TRANSCEIVER_LOOP_DELAY=0
endif
endif