pub struct DisplayCanvas<const L: usize, const W: usize> { /* private fields */ }
Expand description
A display canvas for the Max 7219
W
represents how many displays there are
L
represents how many layers there are
Layers are simply stacked on top of each other where if a pixel is set in any of the layers then the pixel illuminates, therefore no layer has “priority” over the other and the order of layers is irrelevant
Implementations§
Source§impl<const L: usize, const W: usize> DisplayCanvas<L, W>
impl<const L: usize, const W: usize> DisplayCanvas<L, W>
pub fn new() -> Self
pub fn update_layer(&mut self, layer_index: usize, layer: CanvasLayer<W>)
pub fn as_raw_data(&self, display_index: usize) -> [u8; 8]
pub fn write_to_display<C: Connector>( &self, display_index: usize, display: &mut MAX7219<C>, )
Trait Implementations§
Source§impl<const L: usize, const W: usize> Clone for DisplayCanvas<L, W>
impl<const L: usize, const W: usize> Clone for DisplayCanvas<L, W>
Source§fn clone(&self) -> DisplayCanvas<L, W>
fn clone(&self) -> DisplayCanvas<L, W>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<const L: usize, const W: usize> Copy for DisplayCanvas<L, W>
Auto Trait Implementations§
impl<const L: usize, const W: usize> Freeze for DisplayCanvas<L, W>
impl<const L: usize, const W: usize> RefUnwindSafe for DisplayCanvas<L, W>
impl<const L: usize, const W: usize> Send for DisplayCanvas<L, W>
impl<const L: usize, const W: usize> Sync for DisplayCanvas<L, W>
impl<const L: usize, const W: usize> Unpin for DisplayCanvas<L, W>
impl<const L: usize, const W: usize> UnwindSafe for DisplayCanvas<L, W>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more