The lowest possible value is `LORA_SF5` and not `LORA_SF6`. This fixes
the argument validation to allow setting `LORA_SF5` as spreading factor.
Fixes https://github.com/RIOT-OS/RIOT/issues/17861
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 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).
BOARDs with RF switch might only support one of the TX modes, and
on init the BOARD needs to be configured accordingly and the correct
mode selected on TX.
This commit fixes the send function of sx126x. The loop that reads the
iolist was not considering the offset. Therefore each iolist snippet was
being written into the first position.
The loop was also setting the payload length to the size of the iolist
snippet. Then the payload was also wrong.
With this commit an iolist is copied sequentially into the framebuffer
and the payload length is set to `iolist_size`