Capsules are drivers that live in the kernel and are written in Rust. They are required to conform to Rust's type system (i.e. no unsafe
). Capsules are platform agnostic and provide a range of features:
When using hardware resources, capsules must only use features provided by the HIL (hardware interface layer). This ensures they can be used on multiple microcontrollers and hardware platforms.
Capsules have some flexibility in how they present access to a sensor or virtualized hardware resource. Some capsules directly implement the Driver
trait and can be used by userland applications. Others provide an internal interface that can be used by other in-kernel capsules as well as a Driver
interface for applications.
The list of Tock capsules and a brief description.
These implement a driver to setup and read various physical sensors.
These drivers provide support for various ICs.
Support for wireless radios.
Protocol stacks and other libraries.
hil::uart
interface.These capsules provide a Driver
interface for common MCU peripherals.
These provide common and better abstractions for userspace.
These provide virtualized (i.e. multiple applications can use them simultaneously) support for generic sensor interfaces.
These allow for multiple users of shared hardware resources in the kernel.
Other capsules that implement reusable logic.
These are selectively included on a board to help with testing and debugging various elements of Tock.