[][src]Struct p9813::P9813

pub struct P9813<S> { /* fields omitted */ }

Struct representing a P9813 controller.

Methods

impl P9813<()>[src]

pub const MAX_CLOCK_FREQUENCY: u32[src]

Maximum frequency supported by the P9813.

impl<S: Write<u8>> P9813<S>[src]

pub fn new(spi: S) -> Self[src]

Create a new P9813 instance with spi as the underlying SPI interface.

pub fn set_color(&mut self, r: u8, g: u8, b: u8) -> Result<(), S::Error>[src]

Set color for a single P9813.

let mut p9813 = P9813::new(spi);
p9813.set_color(0, 255, 200)?;

pub fn set_colors(
    &mut self,
    colors: impl AsRef<[(u8, u8, u8)]>
) -> Result<(), S::Error>
[src]

Set colors for multiple P9813s chained together.

let mut p9813 = P9813::new(spi);
p9813.set_colors([(0, 255, 200), (255, 50, 20)])?;

Trait Implementations

impl<S: Debug> Debug for P9813<S>[src]

Auto Trait Implementations

impl<S> Unpin for P9813<S> where
    S: Unpin

impl<S> Sync for P9813<S> where
    S: Sync

impl<S> Send for P9813<S> where
    S: Send

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]