zephyr/ext/hal/nordic/drivers/Kbuild

33 lines
1.3 KiB
Makefile

ifeq ($(or $(CONFIG_IEEE802154_NRF5),$(CONFIG_IEEE802154_NRF5_RAW)),y)
obj-y += nrf_drv_radio802154.o
# A common prefix used for placing radio buffer in a named
# memory section.
KBUILD_CFLAGS += -DRADIO_SECTION_PREFIX="\".top_of_image_ram\""
# Number of slots containing short addresses of nodes for which pending data is stored.
KBUILD_CFLAGS += -DRADIO_PENDING_SHORT_ADDRESSES=1
# Number of slots containing extended addresses of nodes for which pending data is stored.
KBUILD_CFLAGS += -DRADIO_PENDING_EXTENDED_ADDRESSES=1
# Number of buffers in receive queue.
KBUILD_CFLAGS += -DRADIO_RX_BUFFERS=1
# CCA mode
ifeq ($(CONFIG_IEEE802154_NRF5_CCA_MODE_ED),y)
KBUILD_CFLAGS += -DRADIO_CCA_MODE=NRF_RADIO_CCA_MODE_ED
else ifeq ($(CONFIG_IEEE802154_NRF5_CCA_MODE_CARRIER),y)
KBUILD_CFLAGS += -DRADIO_CCA_MODE=NRF_RADIO_CCA_MODE_CARRIER
else ifeq ($(IEEE802154_NRF5_CCA_MODE_CARRIER_AND_ED),y)
KBUILD_CFLAGS += -DRADIO_CCA_MODE=NRF_RADIO_CCA_MODE_CARRIER_AND_ED
else ifeq ($(IEEE802154_NRF5_CCA_MODE_CARRIER_OR_ED),y)
KBUILD_CFLAGS += -DRADIO_CCA_MODE=NRF_RADIO_CCA_MODE_CARRIER_OR_ED
endif
# CCA mode options
KBUILD_CFLAGS += -DRADIO_CCA_CORR_LIMIT=$(CONFIG_IEEE802154_NRF5_CCA_CORR_LIMIT)
KBUILD_CFLAGS += -DRADIO_CCA_CORR_THRESHOLD=$(CONFIG_IEEE802154_NRF5_CCA_CORR_THRESHOLD)
KBUILD_CFLAGS += -DRADIO_CCA_ED_THRESHOLD=$(CONFIG_IEEE802154_NRF5_CCA_ED_THRESHOLD)
endif