1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu
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
..
arm7_common cpu/arm7_common: uncrustify vectors.c 2022-04-28 11:57:05 +02:00
atmega32u4 cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega128rfa1 cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega256rfr2 cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega328p cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega1281 cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega1284p cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega2560 cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega_common Merge pull request #18263 from maribu/cpu/avr8/idle_stack 2022-06-29 00:57:57 +02:00
atxmega cpu/{atmega_common,atxmega}: increase idle thread stack size 2022-06-27 14:39:57 +02:00
avr8_common cpu/avr8_common: fix cpu_print_last_instruction 2022-06-20 19:56:00 +02:00
cc26x0_cc13x0 cpu/cc26x0_cc13x0: model Kconfig 2021-11-19 10:52:08 +01:00
cc26x2_cc13x2 cpu/cc26x2_cc13x2: model Kconfig 2021-11-19 10:52:23 +01:00
cc26xx_cc13xx cpu/periph/i2c: update implementations to new I2C API 2021-11-29 06:35:25 +01:00
cc2538 Kconfig/ieee802154: fix typo in hal selector 2022-08-10 13:43:04 +02:00
cortexm_common cpu/cortexm_common: allow to overwrite nmi_handler 2022-06-20 18:22:22 +02:00
efm32 drivers/saul: use const qualifier for data to write 2022-05-23 08:35:27 +02:00
esp32 Merge pull request #18405 from gschorcht/cpu/esp32/periph_gpio_wakeup_extemsion 2022-08-12 15:41:46 +02:00
esp8266 cpu/{esp_common,esp8266,esp32}: fix default FLASH_* configuration 2022-08-02 07:24:30 +02:00
esp_common sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
fe310 Merge pull request #17342 from aabadie/pr/sysclk 2021-12-15 15:41:34 +01:00
gd32v Merge pull request #17723 from benpicco/periph_timer_periodic-set_stopped 2022-05-03 12:06:37 +02:00
kinetis cpu: include IDLE in PM_NUM_MODES 2022-04-06 12:29:25 +02:00
lm4f120 Merge pull request #15902 from maribu/spi-api-change-1 2021-09-02 08:50:56 +02:00
lpc23xx Merge pull request #17723 from benpicco/periph_timer_periodic-set_stopped 2022-05-03 12:06:37 +02:00
lpc1768 cpu: include IDLE in PM_NUM_MODES 2022-04-06 12:29:25 +02:00
mips32r2_common core: change return type of irq_is_in(), irq_is_enabled() to bool 2021-12-08 15:53:15 +01:00
mips_pic32_common cpu/mips: deprecate mips cpu 2021-12-09 10:14:52 +01:00
mips_pic32mx makefiles/tests: use FLASHFILE for hash comparision instead of ELFFILE 2022-06-17 18:31:17 +02:00
mips_pic32mz makefiles/tests: use FLASHFILE for hash comparision instead of ELFFILE 2022-06-17 18:31:17 +02:00
msp430_common periph/flashpage: Add _in_address_space feature 2022-03-17 19:45:54 +01:00
msp430fxyz cpu/msp430: add Kconfig 2021-12-02 16:33:19 +01:00
native Kconfig/ieee802154: fix typo in hal selector 2022-08-10 13:43:04 +02:00
nrf5x_common kconfig: move BLE_* features to common features file 2022-08-12 16:14:58 +02:00
nrf51 cpu/nrf51: use nrfxx_peripherals.h vendor header 2022-06-02 14:59:50 +02:00
nrf52 Merge pull request #18283 from jia200x/pr/opendsme_nrf52840 2022-08-16 11:43:07 +02:00
nrf9160 cpu/nrf5x_common: implement periph/gpio_ll{,_irq} 2022-04-23 19:47:00 +02:00
qn908x treewide: make all modules use Kconfig ZTIMER_USEC indirection 2022-03-17 14:33:07 +01:00
riscv_common cpu/riscv_common: fix undeclared memory region linker error 2022-04-04 13:18:01 +02:00
rpx0xx cpu/rpx0xx: timer: implement TIM_FLAG_SET_STOPPED 2022-03-01 14:22:53 +01:00
sam0_common sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
sam3 sys/ztimer: select ztimer_periph_no_rtt only for samd21 2022-03-15 08:15:22 +01:00
sam_common cpu/sam_common: set CPU_HAS_BITBAND 2020-08-08 12:44:11 +02:00
samd5x cpu/sam0_common: add SD Host Controller implementation 2022-05-31 11:07:20 +02:00
samd21 cpu/samd21: handle silicon errata 2022-06-09 18:27:30 +02:00
saml1x cpu/samd*: adjust PM_BLOCKER_INITIAL to the new API 2022-04-06 12:29:25 +02:00
saml21 cpu: include IDLE in PM_NUM_MODES 2022-04-06 12:29:25 +02:00
stellaris_common
stm32 sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
doc.txt docs/doxygen : Add CPU section 2021-07-09 10:47:42 +02:00
Kconfig treewide: change Kconfig prefix for module symbols 2020-08-31 09:57:28 +02:00