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

36 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
295092bc29
drivers/rn2xx3: migrate to ztimer 2021-11-04 10:39:36 +01:00
fb193ea5cb
drivers/rn2xx3: declare pseudomodules at driver level 2021-10-05 11:48:52 +02:00
Jose Alamos
af5622cd78
rn2xx3: avoid explicit cast to netdev 2021-07-09 10:38:36 +02:00
Akshai M
9600ebf536 net/lorawan : Expose to Kconfig 2021-01-26 16:56:02 +01:00
Akshai M
85c4b5eb3b net/lorawan : Move 'LORAMAC_DEFAULT_JOIN_DELAY2' to 'CONFIG_' 2021-01-26 16:52:59 +01:00
Akshai M
b6e4e74a87 net/lorawan : Move 'LORAMAC_DEFAULT_JOIN_DELAY1' to 'CONFIG_' 2021-01-26 16:52:59 +01:00
Akshai M
81dac00d5c net/lorawan : Move 'LORAMAC_DEFAULT_RX2_FREQ' to 'CONFIG_' 2021-01-26 16:52:59 +01:00
Akshai M
d5086ecf60 net/lorawan : Move 'LORAMAC_DEFAULT_RX2_DR' to 'CONFIG_'
Added symbols 'CONFIG_LORAMAC_DEFAULT_RX2_DR_XX' to define
choice in Kconfig
2021-01-26 16:52:58 +01:00
Akshai M
d48cee7c2a net/lorawan : Move 'LORAMAC_DEFAULT_RX1_DELAY' to 'CONFIG_' 2021-01-26 16:52:58 +01:00
Akshai M
ca4acbff12 net/lorawan : Move 'LORAMAC_DEFAULT_LINKCHK' to 'CONFIG_' 2021-01-26 16:52:58 +01:00
Akshai M
e93c362df2 net/lorawan : Move 'LORAMAC_DEFAULT_RETX' to 'CONFIG_' 2021-01-26 16:52:58 +01:00
Akshai M
97d873a5bd net/lorawan : Move 'LORAMAC_DEFAULT_ADR' to 'CONFIG_'
Move 'LORAMAC_DEFAULT_ADR' to 'CONFIG_' namespace and model
'CONFIG_LORAMAC_DEFAULT_ADR' as BOOL for Kconfig
2021-01-26 16:52:58 +01:00
Akshai M
d2d90fbce5 net/lorawan : Move 'LORAMAC_DEFAULT_TX_MODE' to 'CONFIG_'
Move 'LORAMAC_DEFAULT_TX_MODE' to 'CONFIG_' and added symbols
for Kconfig exposure
2021-01-26 16:52:58 +01:00
Akshai M
aa3b1da0c4 net/lorawan : Move 'LORAMAC_DEFAULT_TX_PORT' to 'CONFIG_' 2021-01-26 16:52:58 +01:00
Akshai M
3a6c4f2f71 net/lorawan : Move 'LORAMAC_DEFAULT_TX_POWER' to 'CONFIG_'
Move 'LORAMAC_DEFAULT_TX_POWER' to 'CONFIG_' namespace and
assign choices for Kconfig exposure
2021-01-26 16:52:58 +01:00
Akshai M
55f196095d net/lorawan : Move 'LORAMAC_DEFAULT_DR' to 'CONFIG_'
Move 'LORAMAC_DEFAULT_DR' to 'CONFIG_' and enable options for
Kconfig
2021-01-26 16:52:58 +01:00
Leandro Lanzieri
7f8ae85d36
drivers/rn2xx3: add modules to Kconfig 2021-01-14 10:00:43 +01:00
Akshai M
95394c4ba7 drivers/rn2xx3 : Update Kconfig
Expose CONFIG_RN2XX3_DEFAULT_AR to Kconfig
2020-12-08 11:34:03 +01:00
Akshai M
bfd3a903fb drivers/rn2xx3 : r/LORAMAC_DEFAULT_AR/CONFIG_RN2XX3_DEFAULT_AR
Move 'LORAMAC_DEFAULT_AR' to drivers/rn2xx3 i.e
'RN2XX3_DEFAULT_AR'
Move 'RN2XX3_DEFAULT_AR' to 'CONFIG_' namespace

Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2020-12-08 11:33:44 +01:00
Benjamin Valentin
9ad6b6b857 drivers/rn2xx3: convert to xtimer_msleep() 2020-11-05 11:32:41 +01:00
Bas Stottelaar
62994dfb16 drivers/*: replace #if ENABLE_DEBUG with IS_ACTIVE 2020-11-02 21:34:12 +01:00
Bas Stottelaar
92b1dfc703 drivers/*: realign ENABLE_DEBUG 2020-10-23 01:26:09 +02:00
Bas Stottelaar
26835a949f drivers/*: remove unused assert.h include 2020-10-22 11:29:27 +02:00
Cenk Gündoğan
538155c344
Merge pull request #14904 from leandrolanzieri/pr/kconfig/change_prefix_convention
treewide: modify Kconfig symbol prefixes
2020-09-01 15:57:06 +02:00
Gunar Schorcht
6d61381d2a drivers: use inline functions for GPIO comparisons
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.
2020-08-31 13:10:28 +02:00
Leandro Lanzieri
d25fc243c4
treewide: change prefix for generated Kconfig symbols.
This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:

   KCONFIG_MODULE_ => KCONFIG_USEMODULE_
   KCONFIG_PKG_ => KCONFIG_USEPKG_
   MODULE_ => USEMODULE_
   PKG_ => USEPKG_
2020-08-31 09:37:09 +02:00
304bce3724
drivers: configure per driver dependency resolution 2020-07-20 14:32:16 +02:00
490126cfa0
drivers: move USEMODULE_INCLUDES in each driver directories 2020-07-15 20:36:27 +02:00
Akshai M
5699b2469b drivers/rn2xx3 : Expose to Kconfig
Expose configurations to Kconfig

Co-Authored-By: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2020-05-22 15:52:03 +05:30
Akshai M
7d679c7f0f drivers/rn2xx3.h : Add CONFIG_
Add CONFIG_ prefix to RN2XX3_DEFAULT_SLEEP
2020-05-22 15:52:03 +05:30
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
76267bdfea
drivers/rn2xx3: cleanup sleep function 2019-10-17 10:02:11 +02:00
1f6895d0f7
drivers/rn2xx3: fix incorrectly terminated hex strings
When writing an array of bytes, each byte is converted on the fly to 2 hex characters and sent to the rn2xx3 module. This change ensures each string is correctly terminated, with null character, when written to the module
2019-06-07 10:39:31 +02:00
Kees Bakker
4f9df5cac9 drivers/rn2xx3: do normal assignment instead of memcpy 2019-01-10 19:43:44 +01:00
b63412efa1 drivers: add rn2xx3 LoRa module driver 2018-01-18 10:46:54 +01:00