1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Go to file
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
.cargo Rust: Use git versions of riot-{sys,wrappers} by default 2022-05-31 17:42:26 +02:00
.circleci .circleci: use riot/static-test-tools Docker image 2021-01-14 19:08:15 +01:00
.github gh_action/test-on-iotlab: update available boards 2022-07-07 16:51:16 +02:00
boards Merge pull request #18383 from jia200x/pr/kw2xrf_radio_hal 2022-08-16 11:42:03 +02:00
bootloaders Merge pull request #17248 from benpicco/riotboot_serial-btn 2022-01-05 14:14:00 +01:00
core core: implement core_mutex_mitigate_priority_inversion 2022-08-05 13:08:52 +02:00
cpu sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
dist doccheck/exclude_patterns: add KW2XRF_PARAM_RESET to exclude list 2022-08-15 12:11:05 +02:00
doc doc/doxygen: use DuckDuckGo for search 2022-07-22 14:39:51 +02:00
drivers sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
examples Merge pull request #18133 from fabian18/gcoap_fileserver_file_and_directory_creation 2022-08-04 16:14:29 +02:00
fuzzing fuzzing: fix parameter for second fuzzing instance in README.md 2022-06-07 00:01:34 +02:00
kconfigs pkg/nimble: add feature ble_adv_ext 2022-08-12 16:15:14 +02:00
makefiles sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
pkg pkg/nimble: add feature ble_adv_ext 2022-08-12 16:15:14 +02:00
sys sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
tests tests/driver_kw2xrf: adapt to radio HAL port 2022-08-15 12:11:05 +02:00
.bandit codacy: disable complaining about python assert 2019-03-01 13:43:37 +01:00
.drone.yml .drone.yml: remove mcu groups from the build test matrix 2019-06-14 11:32:15 +02:00
.gitattributes rust: Treat Cargo.lock files as opaque 2021-12-14 13:27:42 +01:00
.gitignore gitingnore: *bin -> bin and *.bin to not ignore round_robin 2021-10-25 17:05:30 +02:00
.mailmap mailmap: deduplicate @benpicco 2020-04-28 11:58:44 +02:00
.murdock tests/external_boards: add esp32c3-ci board for optional modules 2022-08-07 07:54:38 +02:00
CITATION.cff CITATION.cff: Initial import 2021-10-22 10:21:57 +02:00
CODE_OF_CONDUCT.md github: add Code of Conduct 2017-12-08 09:10:01 +01:00
CODEOWNERS CODEOWNERS: replace cgundogan->MrKevinWeiss for kconfig 2022-04-27 09:33:52 +02:00
CODING_CONVENTIONS_C++.md CODING_CONVENTIONS_C++.md: Change space after negation 2021-10-28 10:49:51 +02:00
CODING_CONVENTIONS.md Coding_Convention: clarify: none return is allowed 2021-03-08 14:46:34 +01:00
CONTRIBUTING.md CONTRIBUTING: Remove Freenode reference 2021-06-18 11:11:27 +02:00
doc.txt doc: Link concrete measures from DEVELHELP documentation 2022-01-27 13:49:25 +01:00
Kconfig Kconfig: load application configuration first 2022-04-27 10:31:23 +02:00
LICENSE * updated LICENSE file from GPL to LPGL 2013-06-18 17:19:53 +02:00
LOSTANDFOUND.md doc: fix libcoap removal commit in LOSTANDFOUND.md 2021-12-10 19:11:36 +01:00
MAINTAINING.md Merge branch 'master' into patch-3 2022-03-09 13:27:18 +01:00
Makefile make: Remove mailing list advertisement 2021-05-12 11:41:25 +02:00
Makefile.base buildsystem/pkg: expand paths early 2022-01-30 19:58:52 +01:00
Makefile.dep makefiles: avoid extra "/" when including files from external modules 2022-02-01 11:22:06 +01:00
Makefile.features drivers: Add periph/gpio_ll API 2022-04-22 08:39:04 +02:00
Makefile.include Merge pull request #18194 from benpicco/dist/tools/cosy-port 2022-07-04 14:44:44 +02:00
README.md doc: Remove merge chance shield (deprecated) 2021-10-25 20:47:48 +02:00
release-notes.txt release-notes.txt: add 2022.04 release notes 2022-05-08 11:39:45 +02:00
SECURITY.md SECURITY.md: Add key link 2021-12-17 10:04:16 +01:00
uncrustify-riot.cfg uncrustify-riot.cfg: update to coding convention 2021-03-04 17:23:46 +01:00
Vagrantfile tools/packer: adapt for Ubuntu 18.04 2020-02-19 19:23:07 +01:00

Nightly CI status master Nightly HiL CI overview GitHub release License API docs Wiki Stack Overflow questions Twitter Matrix

The friendly Operating System for IoT!

RIOT is a real-time multi-threading operating system that supports a range of devices that are typically found in the Internet of Things (IoT): 8-bit, 16-bit and 32-bit microcontrollers.

RIOT is based on the following design principles: energy-efficiency, real-time capabilities, small memory footprint, modularity, and uniform API access, independent of the underlying hardware (this API offers partial POSIX compliance).

RIOT is developed by an international open source community which is independent of specific vendors (e.g. similarly to the Linux community). RIOT is licensed with LGPLv2.1, a copyleft license which fosters indirect business models around the free open-source software platform provided by RIOT, e.g. it is possible to link closed-source code with the LGPL code.

FEATURES

RIOT is based on a microkernel architecture, and provides features including, but not limited to:

  • a preemptive, tickless scheduler with priorities
  • flexible memory management
  • high resolution, long-term timers
  • support 100+ boards based on AVR, MSP430, ESP8266, ESP32, MIPS, RISC-V, ARM7 and ARM Cortex-M
  • the native port allows to run RIOT as-is on Linux, BSD, and MacOS. Multiple instances of RIOT running on a single machine can also be interconnected via a simple virtual Ethernet bridge
  • IPv6
  • 6LoWPAN (RFC4944, RFC6282, and RFC6775)
  • UDP
  • RPL (storing mode, P2P mode)
  • CoAP
  • CCN-Lite
  • Sigfox
  • LoRaWAN

GETTING RIOT

The most convenient way to get RIOT is to clone it via Git

$ git clone https://github.com/RIOT-OS/RIOT

this will ensure that you get all the newest features and bug fixes with the caveat of an ever changing work environment.

If you prefer things more stable, you can download the source code of one of our quarter annual releases via Github as ZIP file or tarball. You can also checkout a release in a cloned Git repository using

$ git pull --tags
$ git checkout <YYYY.MM>

For more details on our release cycle, check our documentation.

GETTING STARTED

  • You want to start the RIOT? Just follow our quickstart guide or try this tutorial. For specific toolchain installation, follow instructions in the getting started page.
  • The RIOT API itself can be built from the code using doxygen. The latest version of the documentation is uploaded daily to doc.riot-os.org.

FORUM

Do you have a question, want to discuss a new feature, or just want to present your latest project using RIOT? Come over to our forum and post to your hearts content.

CONTRIBUTE

To contribute something to RIOT, please refer to our contributing document.

MAILING LISTS

LICENSE

  • Most of the code developed by the RIOT community is licensed under the GNU Lesser General Public License (LGPL) version 2.1 as published by the Free Software Foundation.
  • Some external sources, especially files developed by SICS are published under a separate license.

All code files contain licensing information.

For more information, see the RIOT website:

https://www.riot-os.org