Trait Anim

Source
pub trait Anim: Ext {
    // Provided methods
    fn full_display_blink(&mut self, count: u32, interval_us: u32) { ... }
    fn typewriter_write(&mut self, str: &str, delay_us: u32) { ... }
    fn split_flap_write(
        &mut self,
        str: &str,
        fs: FlipStyle,
        max_flip_cnt: Option<u8>,
        per_flip_delay_us: u32,
        per_char_flip_delay_us: Option<u32>,
    ) { ... }
    fn shift_display_to_pos(
        &mut self,
        target_pos: u8,
        ms: MoveStyle,
        display_state_when_shift: State,
        delay_us_per_step: u32,
    ) { ... }
}
Expand description

Show animation on LCD1602

Provided Methods§

Make the entire screen blink

§Arguments
  • count - the number of times to blink the screen. If the value is 0, the screen will blink endless.
  • interval_us - The interval (in microseconds) at which the screen state changes
Source

fn typewriter_write(&mut self, str: &str, delay_us: u32)

Typewriter-style display

§Arguments
  • str - string to display
  • delay_us - The interval (in microseconds) of each character show up
Source

fn split_flap_write( &mut self, str: &str, fs: FlipStyle, max_flip_cnt: Option<u8>, per_flip_delay_us: u32, per_char_flip_delay_us: Option<u32>, )

Split-Flap-style display

§Arguments
  • str - string to display
  • fs - flip style, see FlipStyle
  • max_flip_cnt - The maximum number of times to flip the display before reaching the target character
  • per_flip_delay_us - The delay (in microseconds) between each flip. It is recommended to set this value to at least 100_000.
  • per_char_flip_delay_us - Used in FlipStyle::Sequential mode, this is the time (in microseconds) to wait between flipping each character
Source

fn shift_display_to_pos( &mut self, target_pos: u8, ms: MoveStyle, display_state_when_shift: State, delay_us_per_step: u32, )

Move the display window to the specified position (measured from the upper-left corner of the display)

§Arguments
  • target_pos - The target position of the display window
  • ms - The style of movement, see MoveStyle
  • display_state_when_shift - Whether to turn off the screen during the move
  • delay_us_per_step - The delay (in microseconds) between each step of the move

Implementors§

Source§

impl<'a, 'b, Sender, Delayer, const READABLE: bool> Anim for Lcd<'a, 'b, Sender, Delayer, READABLE>
where Delayer: DelayNs, Sender: SendCommand<Delayer, READABLE>,