Expand description
A GBA-specific “cell” type that allows safe global mutable data.
Most importantly, data stored in a GbaCell
can be safely shared between
the main program and the interrupt handler.
All you have to do is declare a static GbaCell
:
static THE_COLOR: GbaCell<Color> = GbaCell::new(Color::new());
And then you can use the read
and
write
methods to interact with the data:
let old_color = THE_COLOR.read();
THE_COLOR.write(some_new_color);
Structs
A GBA-specific wrapper around Rust’s
UnsafeCell
type.Traits
Marker trait bound for the methods of
GbaCell
.