1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/cc110x
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/cc110x: use pseudo-modules for band selection 2021-09-17 12:58:10 +02:00
cc110x_calibration.c drivers: update to new periph_spi API 2021-09-01 21:38:40 +02:00
cc110x_chanmaps.c driver/cc110x: Fixed indent/alignment in doc 2019-09-04 13:15:15 +02:00
cc110x_communication.c drivers: update to new periph_spi API 2021-09-01 21:38:40 +02:00
cc110x_configs.c driver/cc110x: Fixed indent/alignment in doc 2019-09-04 13:15:15 +02:00
cc110x_netdev.c Merge pull request #15902 from maribu/spi-api-change-1 2021-09-02 08:50:56 +02:00
cc110x_patables.c driver/cc110x: Fixed indent/alignment in doc 2019-09-04 13:15:15 +02:00
cc110x_rx_tx.c drivers: update to new periph_spi API 2021-09-01 21:38:40 +02:00
cc110x_settings.c drivers/cc110x: replace binary constants and use unsigned char 2020-07-31 13:38:03 +02:00
cc110x.c drivers: update to new periph_spi API 2021-09-01 21:38:40 +02:00
Kconfig treewide: change prefix for generated Kconfig symbols. 2020-08-31 09:37:09 +02:00
Makefile drivers/cc110x: Rewrite of the cc110x driver 2019-08-20 16:32:11 +02: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 drivers/cc110x: declare pseudomodules at driver level 2021-10-05 11:48:50 +02:00