pub struct TM1637Builder<CLK, DIO, DELAY> { /* private fields */ }
Expand description
TM1637
7-segment display builder.
Implementations§
Source§impl<CLK, DIO, DELAY> TM1637Builder<CLK, DIO, DELAY>
impl<CLK, DIO, DELAY> TM1637Builder<CLK, DIO, DELAY>
Sourcepub const fn new(clk: CLK, dio: DIO, delay: DELAY) -> Self
pub const fn new(clk: CLK, dio: DIO, delay: DELAY) -> Self
Create a new TM1637Builder
instance with default values.
brightness
:Brightness::L0
delay_us
: 100
Sourcepub fn brightness(self, brightness: Brightness) -> Self
pub fn brightness(self, brightness: Brightness) -> Self
Set the brightness level.
Sourcepub fn build<const N: usize, T: Mode>(self) -> TM1637<N, T, CLK, DIO, DELAY>
pub fn build<const N: usize, T: Mode>(self) -> TM1637<N, T, CLK, DIO, DELAY>
Build a TM1637
instance with the specified mode.
§Async
use tm1637_embedded_hal::{mock::Noop, tokens::Async, TM1637Builder};
let clk = Noop;
let dio = Noop;
let delay = Noop;
let tm = TM1637Builder::new(clk, dio, delay).build::<4, Async>();
§Blocking
use tm1637_embedded_hal::{mock::Noop, tokens::Blocking, TM1637Builder};
let clk = Noop;
let dio = Noop;
let delay = Noop;
let tm = TM1637Builder::new(clk, dio, delay).build::<4, Blocking>();
Trait Implementations§
Source§impl<CLK: Clone, DIO: Clone, DELAY: Clone> Clone for TM1637Builder<CLK, DIO, DELAY>
impl<CLK: Clone, DIO: Clone, DELAY: Clone> Clone for TM1637Builder<CLK, DIO, DELAY>
Source§fn clone(&self) -> TM1637Builder<CLK, DIO, DELAY>
fn clone(&self) -> TM1637Builder<CLK, DIO, DELAY>
Returns a copy 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 moreAuto Trait Implementations§
impl<CLK, DIO, DELAY> Freeze for TM1637Builder<CLK, DIO, DELAY>
impl<CLK, DIO, DELAY> RefUnwindSafe for TM1637Builder<CLK, DIO, DELAY>
impl<CLK, DIO, DELAY> Send for TM1637Builder<CLK, DIO, DELAY>
impl<CLK, DIO, DELAY> Sync for TM1637Builder<CLK, DIO, DELAY>
impl<CLK, DIO, DELAY> Unpin for TM1637Builder<CLK, DIO, DELAY>
impl<CLK, DIO, DELAY> UnwindSafe for TM1637Builder<CLK, DIO, DELAY>
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