Module riot_wrappers::shell[][src]

Expand description

Tools for running RIOT’s built-in shell

This module can be used in two ways:

  • Declare static commands using static_command; these only take a fn (not a closure) because shell commands don’t have an arg pointer.

    This works even in RIOT modules that are included in a C application that starts a shell, and show up in shells created through Rust without explicit inclusion.

  • Use new to start building a CommandList. This can have full closures as commands, but these are available only when the shell is then started throught the CommandList’s run methods.

Re-exports

Structs

Newtype around an (argc, argv) C style string array that presents itself as much as an &'a [&'a str] as possible. (Slicing is not implemented for reasons of laziness).

Internal helper that is used to create the linear [riot_sys::shellcommand_t] structure that a command list needs to pass to RIOT

Internal helper that holds the data assembled using the CommandList::and builder

Traits

A list of commands that can be presented as a shell prompt

Something that can build a suitable command array for itself and its next commands using shell_run_once etc.

Functions

Start a blank list of commands