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.
The device ID returned on WLR089 is 0x13 instead of 0x12, but it appears to
work just like sx1276.
Also check for the other device ID to make the driver work on this module.
The RSSI values reported by LoRa transceiver can be less than -127.
Therefore, `int8_t` is not enough. This commit defines the RSSI of
`netdev_lora_rx_info` as `int16_t` and adapt the drivers accordingly
(sx126x, sx127x).
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.
The expandable GPIO API requires the comparison of structured GPIO types. This means that inline functions must be used instead of direct comparisons. For the migration process, drivers must first be changed so that they use the inline comparison functions.
If ValidHeader interrupt is set, it triggers DIO3 interrupt. However, if DIO3 line is not connected, ValidHeader interrupt is still set in RegIrqFlags register when RxDone interrupt is triggered on DIO0. It sets the mode back to idle. Therefore, the _on_dio3_irq does not clear the ValidHeader interrupt flag.
Since the RxTimeout interrupt is enabled, DIO1 mapping should be set also to RxTimeout in case the driver is extended in future and DIO1 mapping is changed for any reason.