tm1637_embedded_hal/options/scroll/
style.rs

1/// Style for scrolling bytes.
2#[derive(Debug, Default, Clone, Copy)]
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
4pub enum ScrollStyle {
5    #[default]
6    /// Bytes are moved in circular overlapping windows.
7    ///
8    /// # Example
9    ///
10    /// The display has 4 digits and the bytes are `HELLO `, the display will show:
11    ///
12    /// ```text
13    /// +---+ +---+ +---+ +---+
14    /// | H | | E | | L | | L |
15    /// +---+ +---+ +---+ +---+
16    ///
17    /// +---+ +---+ +---+ +---+
18    /// | E | | L | | L | | O |
19    /// +---+ +---+ +---+ +---+
20    ///
21    /// +---+ +---+ +---+ +---+
22    /// | L | | L | | O | |   |
23    /// +---+ +---+ +---+ +---+
24    ///
25    /// +---+ +---+ +---+ +---+
26    /// | L | | O | |   | | H |
27    /// +---+ +---+ +---+ +---+
28    ///
29    /// +---+ +---+ +---+ +---+
30    /// | O | |   | | H | | E |
31    /// +---+ +---+ +---+ +---+
32    ///
33    /// +---+ +---+ +---+ +---+
34    /// |   | | H | | E | | L |
35    /// +---+ +---+ +---+ +---+
36    ///
37    /// +---+ +---+ +---+ +---+
38    /// | H | | E | | L | | L |
39    /// +---+ +---+ +---+ +---+
40    /// ```
41    Circular,
42    /// Bytes are moved in windows.
43    ///
44    /// # Example
45    ///
46    /// The display has 4 digits and the bytes are `HELLO `, the display will show:
47    ///
48    /// ```text
49    /// +---+ +---+ +---+ +---+
50    /// | H | | E | | L | | L |
51    /// +---+ +---+ +---+ +---+
52    ///
53    /// +---+ +---+ +---+ +---+
54    /// | E | | L | | L | | O |
55    /// +---+ +---+ +---+ +---+
56    ///
57    /// +---+ +---+ +---+ +---+
58    /// | L | | L | | O | |   |
59    /// +---+ +---+ +---+ +---+
60    /// ```
61    Linear,
62}