1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/at86rf215
Marian Buschsieweke 276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
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.
2022-08-17 12:56:07 +02:00
..
include drivers/at86rf215: use global ACK Timeout value 2022-08-12 11:12:12 +02:00
at86rf215_fsk.c drivers/at86rf215: fix ENABLE_DEBUG definition 2021-01-08 14:37:33 +01:00
at86rf215_getset.c drivers/at86rf215: make TX/RX IRQs read only 2021-03-22 08:15:54 +01:00
at86rf215_internal.c drivers/at86rf215: implement Battery Monitor 2020-11-13 22:59:09 +01:00
at86rf215_netdev.c Merge pull request #17979 from maribu/drivers/netdev_ieee802154 2022-06-02 00:47:56 +02:00
at86rf215_o-qpsk.c drivers/at86rf215: use global ACK Timeout value 2022-08-12 11:12:12 +02:00
at86rf215_ofdm.c Merge pull request #14959 from benpicco/at86rf215-mr-fsk 2020-11-03 11:26:24 +01:00
at86rf215.c drivers/at86rf215: fix CONFIG_AT86RF215_RPC_EN macro name 2022-03-16 20:59:35 +01:00
Kconfig sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
Makefile drivers/at86rf215: fix disabling individual modulations 2022-02-16 18:01:07 +01:00
Makefile.dep sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
Makefile.include driver/netdev_ieee802154: Make timestamp optional 2022-04-22 14:33:56 +02:00