[−][src]Struct p9813::P9813
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]
&mut self,
colors: impl AsRef<[(u8, u8, u8)]>
) -> Result<(), S::Error>
Set colors for multiple P9813s chained together.
let mut p9813 = P9813::new(spi); p9813.set_colors([(0, 255, 200), (255, 50, 20)])?;
Trait Implementations
Auto Trait Implementations
impl<S> Unpin for P9813<S> where
S: Unpin,
S: Unpin,
impl<S> Sync for P9813<S> where
S: Sync,
S: Sync,
impl<S> Send for P9813<S> where
S: Send,
S: Send,
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,