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_initTools for declaring a function that is run during initialization - bluetil
riot_module_bluetil_adBluetil tools for BLE Advertising Data (AD) - coap_
handler riot_module_gcoapThis 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_gcoapThis 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_gnrcExperimental area for GNRC utility functions - gpio
riot_module_periph_gpioAccess to RIOT’s GPIO pins - helpers 🔒Small tools used in different wrappers without being actually public
- i2c
riot_module_periph_i2cControlling 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_msgAccess to messages by explicit type indication - Data-carrying mutex built using RIOT’s mutex module
- never 🔒
- random
riot_module_randomRIOT’s system random number generator - saul
riot_module_saulRegistration and use of SAUL, the Sensor Actuator Uber Layer - shell
riot_module_shellTools for running RIOT’s built-in shell - socket
riot_module_sock - socket_
embedded_ nal riot_module_sock_udpandwith_embedded_nalAn implementation of the embedded_nal (Network Abstradtion Layer) UDP traits based on RIOT sockets - socket_
embedded_ nal_ async_ udp riot_module_sock_udpandriot_module_sock_aux_localandwith_embedded_nal_async - socket_
embedded_ nal_ tcp riot_module_sock_tcpandwith_embedded_nalAn 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_vfsAccess to the Virtual File System (VFS) layer - ztimer
riot_module_ztimer
Macros§
- auto_
init riot_module_auto_initRun the function$funcduring 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_shellMake a function whose signature isfn(&mutStdio,Args<'b>) -> implTerminationavailable through XFA in any RIOT shell, even when called throuch C. (The function’s signature may be more generic, eg. accepting animplWriteand animplIntoIterator<&str>).
Constants§
- The identifier of the RIOT board the program is being built for (
RIOT_BOARDin 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::*). *mutanalogon to inline_cast- inline_
cast_ 🔒 ⚠ref &analogon to inline_cast &mutanalogon to inline_cast