forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ext: Integrate Nordic's 802.15.4 radio driver into Zephyr
This patch includes the new files in the build and refactors the Kconfig and Kbuild files in ext/hal/nordic to acommodate for the presence of the radio driver. Change-Id: Ifeda1f6d51916c7096be3c09ef7db6ca59c87728 Signed-off-by: Wojciech Bober <[email protected]>
- Loading branch information
Showing
5 changed files
with
44 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,8 @@ config HAS_NORDIC_MDK | |
bool | ||
|
||
config HAS_NORDIC_HAL | ||
bool | ||
bool | ||
|
||
config HAS_NORDIC_DRIVERS | ||
bool | ||
select HAS_NORDIC_HAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,33 @@ | ||
obj-$(CONFIG_IEEE154_NRF5) += nrf_drv_radio802154.o | ||
obj-$(CONFIG_IEEE802154_NRF5) += nrf_drv_radio802154.o | ||
|
||
ifeq ($(CONFIG_IEEE802154_NRF5),y) | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,3 @@ | ||
ifeq ($(CONFIG_IEEE154_NRF5),y) | ||
ifeq ($(CONFIG_IEEE802154_NRF5),y) | ||
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/nordic/drivers | ||
|
||
# A common prefix used for placing radio buffer in a named | ||
# memory section. | ||
CFLAGS += -DRADIO_SECTION_PREFIX=".top_of_image_ram" | ||
|
||
# Number of slots containing short addresses of nodes for which pending data is stored. | ||
CFLAGS += -DRADIO_PENDING_SHORT_ADDRESSES=1 | ||
|
||
# Number of slots containing extended addresses of nodes for which pending data is stored. | ||
CFLAGS += -DRADIO_PENDING_EXTENDED_ADDRESSES=1 | ||
|
||
# Number of buffers in receive queue. | ||
CFLAGS += -DRADIO_RX_BUFFERS=1 | ||
|
||
# CCA mode | ||
ifeq ($(CONFIG_IEEE154_NRF5_CCA_MODE_ED,y) | ||
CFLAGS += -DRADIO_CCA_MODE=NRF_RADIO_CCA_MODE_ED | ||
else ifeq ($(CONFIG_IEEE154_NRF5_CCA_MODE_CARRIER),y) | ||
CFLAGS += -DRADIO_CCA_MODE=NRF_RADIO_CCA_MODE_CARRIER | ||
else ifeq ($(IEEE154_NRF5_CCA_MODE_CARRIER_AND_ED),y) | ||
CFLAGS += -DRADIO_CCA_MODE=NRF_RADIO_CCA_MODE_CARRIER_AND_ED | ||
else ifeq ($(IEEE154_NRF5_CCA_MODE_CARRIER_OR_ED),y) | ||
CFLAGS += -DRADIO_CCA_MODE=NRF_RADIO_CCA_MODE_CARRIER_OR_ED | ||
endif | ||
|
||
# CCA mode options | ||
CFLAGS += -DRADIO_CCA_CORR_LIMIT=$(CONFIG_IEEE154_NRF5_CCA_CORR_LIMIT) | ||
CFLAGS += -DRADIO_CCA_CORR_THRESHOLD=$(CONFIG_IEEE154_NRF5_CCA_CORR_THRESHOLD) | ||
CFLAGS += -DRADIO_CCA_ED_THRESHOLD=$(CONFIG_IEEE154_NRF5_CCA_ED_THRESHOLD) | ||
|
||
endif |