Skip to content

Latest commit

 

History

History
126 lines (88 loc) · 4.55 KB

README.md

File metadata and controls

126 lines (88 loc) · 4.55 KB

Tock Capsules

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:

  • Drivers for sensors or other ICs
  • Virtualization of hardware resources
  • Syscall interfaces for userland applications

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.

List of Tock Capsules

The list of Tock capsules and a brief description.

Sensor and other IC Drivers

These implement a driver to setup and read various physical sensors.

These drivers provide support for various ICs.

Wireless

Support for wireless radios.

Libraries

Protocol stacks and other libraries.

MCU Peripherals for Userspace

These capsules provide a Driver interface for common MCU peripherals.

  • ADC: Individual and continuous samples.
  • Alarm: Oneshot and periodic timers.
  • CRC: CRC calculation.
  • DAC: Digital to analog conversion.
  • GPIO: GPIO configuring and control.
  • I2C: I2C master and slave access.
  • RNG: Random number generation.
  • SPI: SPI master and slave.

Helpful Userspace Capsules

These provide common and better abstractions for userspace.

Virtualized Sensor Capsules for Userspace

These provide virtualized (i.e. multiple applications can use them simultaneously) support for generic sensor interfaces.

Virtualized Hardware Resources

These allow for multiple users of shared hardware resources in the kernel.

Utility Capsules

Other capsules that implement reusable logic.