Trait lcd1602_driver::LCDAnimation
source · pub trait LCDAnimation {
// Required 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: 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
);
fn delay_ms(&mut self, ms: u32);
fn delay_us(&mut self, us: u32);
}
Expand description
The LCDAnimation trait provides methods for animating the display
Required Methods§
sourcefn full_display_blink(&mut self, count: u32, interval_us: u32)
fn full_display_blink(&mut self, count: u32, interval_us: u32)
Make the entire screen blink
Arguments
count
- the number of times to blink the screen. If the value is0
, the screen will blink endless.interval_us
- The interval (in microseconds) at which the screen state changes
sourcefn typewriter_write(&mut self, str: &str, delay_us: u32)
fn typewriter_write(&mut self, str: &str, delay_us: u32)
Typewriter-style display
Arguments
str
- string to displaydelay_us
- The interval (in microseconds) of each character show up
sourcefn split_flap_write(
&mut self,
str: &str,
fs: FlipStyle,
max_flip_cnt: u8,
per_flip_delay_us: u32,
per_char_flip_delay_us: Option<u32>
)
fn split_flap_write( &mut self, str: &str, fs: FlipStyle, max_flip_cnt: u8, per_flip_delay_us: u32, per_char_flip_delay_us: Option<u32> )
Split-Flap-style display
Arguments
str
- string to displayfs
- flip style, see FlipStylemax_flip_cnt
- The maximum number of times to flip the display before reaching the target characterper_flip_delay_us
- The delay (in microseconds) between each flip. It is recommended to set this value to at least100_000
.per_char_flip_delay_us
- Used in FlipStyle::Sequential mode, this is the time (in microseconds) to wait between flipping each character
sourcefn shift_display_to_pos(
&mut self,
target_pos: u8,
ms: MoveStyle,
display_state_when_shift: State,
delay_us_per_step: u32
)
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 windowms
- The style of movement, see MoveStyledisplay_state_when_shift
- Whether to turn off the screen during the movedelay_us_per_step
- The delay (in microseconds) between each step of the move