1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! A platform agnostic driver to interface with the `TM1637` (7-segment display) using the [`embedded-hal`](embedded_hal) and [`embedded-hal-async`](embedded_hal_async) traits.
//!
//! ```rust
//! use tm1637_embedded_hal::{mock::Noop, Brightness, TM1637Builder};
//!
//! let mut tm = TM1637Builder::new(Noop, Noop, Noop)
//! .brightness(Brightness::L3)
//! .delay_us(100)
//! // Blocking or async mode
//! .build_blocking::<6>();
//!
//! // Clear the display and set brightness
//! tm.init().ok();
//!
//! // High-Level fluent API
//! tm.options()
//! .str("HELLO. ruSt.")
//! .scroll()
//! .linear()
//! .finish()
//! .run();
//!
//! // Or Low-Level API
//! let bytes = &[0b00000110, 0b01011011, 0b01001111, 0b01100110]; // `1234`
//!
//! tm.display_slice(0, bytes).ok();
//! ```
//!
//! # Features
//!
//! - `ack`: Enables the driver to use the [`InputPin`](https://docs.rs/embedded-hal/latest/embedded_hal/digital/trait.InputPin.html) trait for the `DIO` pin and wait for the acknowledgment signal from the display.
//! - `defmt`: Implements [`defmt::Format`](https://docs.rs/defmt/latest/defmt/trait.Format.html) for structs and enums.
pub use Brightness;
pub use TM1637Builder;
pub use ConditionalInputPin;
pub use TM1637;
pub use Error;
pub use Identity;