mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
276ad5716a
A if `netdev_driver_t::confirm_send()` is provided, it provides the new netdev API. However, detecting the API at runtime and handling both API styles comes at a cost. This can be optimized in case only new or only old style netdevs are in use. To do so, this adds the pseudo modules `netdev_legacy_api` and `netdev_new_api`. As right now no netdev actually implements the new API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is in used but `netdev_new_api` is not, we can safely assume at compile time that only legacy netdevs are in use. Similar, if only `netdev_new_api` is used, only support for the new API is needed. Only when both are in use, run time checks are needed. This provides two helper function to check for a netif if the corresponding netdev implements the old or the new API. (With one being the inverse of the other.) They are suitable for constant folding when only new or only legacy devices are in use. Consequently, dead branches should be eliminated by the optimizer.
131 lines
3.0 KiB
Plaintext
131 lines
3.0 KiB
Plaintext
# Copyright (c) 2022 HAW Hamburg
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU Lesser
|
|
# General Public License v2.1. See the file LICENSE in the top level
|
|
# directory for more details.
|
|
#
|
|
|
|
menuconfig MODULE_AT86RF2XX
|
|
bool
|
|
prompt "AT86RF2xx series radios" if !(MODULE_NETDEV_DEFAULT && HAVE_AT86RF2XX)
|
|
default (MODULE_NETDEV_DEFAULT && HAVE_AT86RF2XX)
|
|
depends on TEST_KCONFIG
|
|
select MODULE_IEEE802154
|
|
select MODULE_NETDEV
|
|
select MODULE_NETDEV_IEEE802154
|
|
select MODULE_NETDEV_LEGACY_API
|
|
select MODULE_XTIMER
|
|
|
|
if MODULE_AT86RF2XX
|
|
|
|
choice AT86RF2XX_VARIANT
|
|
bool "Variants"
|
|
default MODULE_AT86RF212B if HAVE_AT86RF212B
|
|
default MODULE_AT86RF231 if HAVE_AT86RF231
|
|
default MODULE_AT86RF232 if HAVE_AT86RF232
|
|
default MODULE_AT86RF233 if HAVE_AT86RF233
|
|
default MODULE_AT86RFA1 if HAVE_AT86RFA1
|
|
default MODULE_AT86RFR2 if HAVE_AT86RFR2
|
|
help
|
|
Select the specific part-number.
|
|
|
|
config MODULE_AT86RF231
|
|
bool "AT86RF231"
|
|
depends on HAS_PERIPH_GPIO
|
|
depends on HAS_PERIPH_GPIO_IRQ
|
|
depends on HAS_PERIPH_SPI
|
|
select MODULE_PERIPH_GPIO
|
|
select MODULE_PERIPH_GPIO_IRQ
|
|
select MODULE_PERIPH_SPI
|
|
|
|
config MODULE_AT86RF212B
|
|
bool "AT86RF212B"
|
|
depends on HAS_PERIPH_GPIO
|
|
depends on HAS_PERIPH_GPIO_IRQ
|
|
depends on HAS_PERIPH_SPI
|
|
select MODULE_PERIPH_GPIO
|
|
select MODULE_PERIPH_GPIO_IRQ
|
|
select MODULE_PERIPH_SPI
|
|
|
|
config MODULE_AT86RF232
|
|
bool "AT86RF232"
|
|
depends on HAS_PERIPH_GPIO
|
|
depends on HAS_PERIPH_GPIO_IRQ
|
|
depends on HAS_PERIPH_SPI
|
|
select MODULE_PERIPH_GPIO
|
|
select MODULE_PERIPH_GPIO_IRQ
|
|
select MODULE_PERIPH_SPI
|
|
|
|
config MODULE_AT86RF233
|
|
bool "AT86RF233"
|
|
depends on HAS_PERIPH_GPIO
|
|
depends on HAS_PERIPH_GPIO_IRQ
|
|
depends on HAS_PERIPH_SPI
|
|
select MODULE_PERIPH_GPIO
|
|
select MODULE_PERIPH_GPIO_IRQ
|
|
select MODULE_PERIPH_SPI
|
|
|
|
config MODULE_AT86RFA1
|
|
bool "AT86RFA1"
|
|
|
|
config MODULE_AT86RFR2
|
|
bool "AT86RFR2"
|
|
|
|
endchoice
|
|
|
|
config MODULE_AUTO_INIT_AT86RF2XX
|
|
bool "Auto-initialize the driver"
|
|
default y
|
|
depends on MODULE_AUTO_INIT
|
|
|
|
config MODULE_AT86RF2XX_AES_SPI
|
|
bool "AES security"
|
|
|
|
config AT86RF2XX_OQPSK
|
|
bool "O-QPSK support"
|
|
select MODULE_NETDEV_IEEE802154_OQPSK
|
|
default y
|
|
|
|
endif # MODULE_AT86RF2XX
|
|
|
|
config HAVE_AT86RF2XX
|
|
bool
|
|
help
|
|
Indicates that an AT86RF2XX radio is present.
|
|
|
|
config HAVE_AT86RF212B
|
|
bool
|
|
select HAVE_AT86RF2XX
|
|
help
|
|
Indicates that an AT86RF212B radio is present.
|
|
|
|
config HAVE_AT86RF231
|
|
bool
|
|
select HAVE_AT86RF2XX
|
|
help
|
|
Indicates that an AT86RF231 radio is present.
|
|
|
|
config HAVE_AT86RF232
|
|
bool
|
|
select HAVE_AT86RF2XX
|
|
help
|
|
Indicates that an AT86RF232 radio is present.
|
|
|
|
config HAVE_AT86RF233
|
|
bool
|
|
select HAVE_AT86RF2XX
|
|
help
|
|
Indicates that an AT86RF233 radio is present.
|
|
|
|
config HAVE_AT86RFA1
|
|
bool
|
|
select HAVE_AT86RF2XX
|
|
help
|
|
Indicates that an AT86RFA1 radio is present.
|
|
|
|
config HAVE_AT86RFR2
|
|
bool
|
|
select HAVE_AT86RF2XX
|
|
help
|
|
Indicates that an AT86RFR2 radio is present.
|