1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

8 Commits

Author SHA1 Message Date
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
José Alamos
1ee57f80a0
Merge pull request #15030 from jia200x/pr/lora/remove_xtimer
drivers/sx127x: remove ZTIMER_USEC dependency
2021-09-27 11:41:22 +02:00
Jose Alamos
e312155f30 drivers/sx127x: remove ZTIMER_USEC dependency 2021-09-27 10:22:06 +02:00
Jose Alamos
c8f9d85002
shell_commands/gnrc_netif: fix gnrc_netif_cmd_lora dependency
This commit fixes the dependency resolution of `gnrc_netif_cmd_lora`.
As it was, this module was pulled by the driver if `gnrc` was used.
Besides pulling an extra dependency in applications that don't use
`shell_commands` or `gnrc_lorawan`, this hardcodes the module
resolution in the drivers.

This commit pulls `gnrc_netif_cmd_lora` if `shell_commands` and
`gnrc_lorawan` are present.
2021-07-09 13:29:07 +02:00
Francisco Molina
3e4e664071
ztimer: remove duplicate dependencies 2021-06-16 11:18:25 +02:00
Leandro Lanzieri
0e52e2747e
drivers: remove netif as dependency for network device drivers 2020-11-13 09:25:59 +01:00
6199ada6b5
drivers/sx127x: migrate to ztimer 2020-08-20 13:41:32 +02:00
304bce3724
drivers: configure per driver dependency resolution 2020-07-20 14:32:16 +02:00