2024-02-01 13:55:02 +01:00
|
|
|
ifneq (,$(filter native native64,$(BOARD)))
|
2022-01-18 16:58:36 +01:00
|
|
|
CAN_DRIVER ?= PERIPH_CAN
|
|
|
|
endif
|
|
|
|
|
|
|
|
# define the CAN driver you want to use here
|
|
|
|
CAN_DRIVER ?= MCP2515
|
|
|
|
|
2024-03-22 17:31:59 +01:00
|
|
|
# define the CPU family used
|
|
|
|
CPU_USED ?= SAME54
|
|
|
|
|
2022-01-18 16:58:36 +01:00
|
|
|
ifeq ($(CAN_DRIVER), PERIPH_CAN)
|
|
|
|
FEATURES_REQUIRED += periph_can
|
2024-03-22 17:31:59 +01:00
|
|
|
ifeq (SAME54, $(CPU_USED))
|
|
|
|
# You can increase the number of provided filters using this block. Default number : 3
|
|
|
|
# CFLAGS += "-DCANDEV_SAMD5X_DEFAULT_STD_FILTER_NUM=5"
|
|
|
|
# CFLAGS += "-DCANDEV_SAMD5X_DEFAULT_EXT_FILTER_NUM=5"
|
|
|
|
endif
|
2022-01-18 16:58:36 +01:00
|
|
|
else ifeq ($(CAN_DRIVER), MCP2515)
|
|
|
|
USEMODULE += mcp2515
|
2022-05-05 17:39:19 +02:00
|
|
|
# Uncomment to enable MCP2515 reception filtering
|
|
|
|
# CFLAGS += "-DMCP2515_RECV_FILTER_EN=1"
|
2022-01-18 16:58:36 +01:00
|
|
|
else ifeq ($(CAN_DRIVER), CAN_ALT)
|
|
|
|
# other can modules can be defined here
|
|
|
|
endif
|