Expand description
Safe and idiomatic Rust wrappers for RIOT-OS
See RIOT’s documentation on using Rust for a general introduction to Rust on RIOT, this crate’s README file on general concepts (such as the interaction between modules here, RIOT modules and features), and the individual modules’ documentation entries for details.
Re-exports§
pub use riot_sys;
pub use cstr;
Modules§
- adc
riot_module_periph_adc
- Tools used internally to create futures more easily
- auto_
init riot_module_auto_init
Tools for declaring a function that is run during initialization - bluetil
riot_module_bluetil_ad
Bluetil tools for BLE Advertising Data (AD) - coap_
handler riot_module_gcoap
This module provides a wrappers around a coap_handler::Handler in different versions, all of which can be registered at a RIOT GcoapHandler. - coap_
message riot_module_gcoap
This module implements coap_message::ReadableMessage for, and a wrapper that provides coap_message::MutableWritableMessage around, RIOT’s coap_pkt_t. - Common error handling components for the RIOT operating system
- gcoap
riot_module_gcoap
- gnrc_
pktbuf riot_module_gnrc_pktbuf
- gnrc_
util riot_module_gnrc
Experimental area for GNRC utility functions - gpio
riot_module_periph_gpio
Access to RIOT’s GPIO pins - helpers 🔒Small tools used in different wrappers without being actually public
- i2c
riot_module_periph_i2c
Controlling the I²C bus - Interaction with interrupts
- Wrappers for the
LEDn_{ON,OFF,TOGGLE}
macros - Tools for providing a RIOT main function
- msg
riot_module_core_msg
Access to messages by explicit type indication - Data-carrying mutex built using RIOT’s mutex module
- never 🔒
- random
riot_module_random
RIOT’s system random number generator - saul
riot_module_saul
Registration and use of SAUL, the Sensor Actuator Uber Layer - shell
riot_module_shell
Tools for running RIOT’s built-in shell - socket
riot_module_sock
- socket_
embedded_ nal riot_module_sock_udp
andwith_embedded_nal
An implementation of the embedded_nal (Network Abstradtion Layer) UDP traits based on RIOT sockets - socket_
embedded_ nal_ async_ udp riot_module_sock_udp
andriot_module_sock_aux_local
andwith_embedded_nal_async
- socket_
embedded_ nal_ tcp riot_module_sock_tcp
andwith_embedded_nal
An implementation of the embedded_nal (Network Abstradtion Layer) TCP traits based on RIOT sockets - spi
riot_module_periph_spi
- Wrappers for the stdio
- Create, inspect or modify RIOT processes (“threads”)
- vfs
riot_module_vfs
Access to the Virtual File System (VFS) layer - ztimer
riot_module_ztimer
Macros§
- auto_
init riot_module_auto_init
Run the function$func
during auto initialization, with the priority giving the position in the initialization sequence. - To have a nice Rust main function, run the
riot_main!
macro with the name of your main function an item (ie. top level in a module) in your crate. The function identified by it must return something that implements the Termination trait. - static_
command riot_module_shell
Make a function whose signature isfn(&mut
Stdio
,
Args
<'b>) -> impl
Termination
available through XFA in any RIOT shell, even when called throuch C. (The function’s signature may be more generic, eg. accepting animpl
Write
and animpl
IntoIterator
<&str>
).
Constants§
- The identifier of the RIOT board the program is being built for (
RIOT_BOARD
in C).
Functions§
- Cast pointers around before passing them in to functions; this is sometimes needed when a struct is used from bindgen (
riot_sys::*
) but passed to a C2Rust function that uses its own definition (riot_sys::inline::*
). *mut
analogon to inline_cast- inline_
cast_ 🔒 ⚠ref &
analogon to inline_cast &mut
analogon to inline_cast