Module kernel::utilities::cells

source ·
Expand description

Create a “fake” module inside of common for all of the Tock Cell types.

To use TakeCell, for example, users should use:

use kernel::utilities::cells::TakeCell;


  • A mutable, possibly unset, memory location that provides checked &mut access to its contents via a closure.
  • OptionalCell is a Cell that wraps an Option. This is helper type that makes keeping types that can be None a little cleaner.
  • A shared reference to a mutable reference.
  • VolatileCell provides a wrapper around unsafe volatile pointer reads and writes. This is particularly useful for accessing microcontroller registers by (unsafely) casting a pointer to the register into a VolatileCell.