Crate capsules_core

source ·


  • Syscall driver capsules for ADC sampling.
  • Tock syscall driver capsule for Alarms, which issue callbacks when a point in time has been reached.
  • Provides userspace control of buttons on a board.
  • Provides userspace with access to a serial interface.
  • Provides userspace with access to a serial interface whose output is in-order with respect to kernel debug!() operations. Prints to the console are atomic up to particular constant length, which can be set at capsule instantiation.
  • Mapping of capsules to their syscall driver number.
  • Provides userspace applications with access to GPIO pins.
  • SyscallDriver for an I2C Master interface.
  • Combines two hardware devices into a single I2C master/slave device.
  • Provides both an I2C Master and I2C Slave interface to userspace.
  • Provides userspace access to LEDs on a board.
  • Provides low-level debugging functionality to userspace. The system call interface is documented in doc/syscalls/
  • Implements a text console over the UART that allows a terminal to inspect and control userspace processes.
  • Library of randomness structures, including a system call driver for userspace applications to request randomness, entropy conversion, entropy to randomness conversion, and synchronous random number generation.
  • Provides userspace applications with the ability to communicate over the SPI bus.
  • Provides userspace applications with the ability to communicate over the SPI bus as a peripheral. Only supports chip select 0.


  • The decoding equivalent of enc_consume
  • The decoding equivalent of enc_try. The only difference is that only an immutable borrow of the buffer is required each time.
  • This is the aforementioned version of the unwrapping macro that only returns the offset. With this, it can be simpler to programmatically chain multiple headers together when the outputs do not have to be collated.
  • Extracts the result of encoding/decoding (the new offset and the output) only if no errors were encountered in encoding. This macro makes it possible to handle offsets easily for the following use cases:
  • Returns an error if a condition is unmet
  • Returns the result of encoding/decoding
  • Returns an error
  • Gets the result of an Option<T>, throwing a stream error if it is None
  • Returns a buffer length error if there are not enough bytes