Crate lcd1602_driver
source ·Expand description
LCD 1602 Driver
Basic Usage:
- Initialize pins:
- Initialize three push-pull pins for RS / RW / E of LCD1602
- Initialize 8 or 4 open-drain pins for DB0~DB7 or DB4~DB7 of LCD1602
- Initialize a delay timer(which implement embedded_hal::blocking::delay)
- Use 8 pin Pins::new() or 4 pin Pins::new() to create a Pins struct containing all initialized pins
- Use the Builder::new() to create a Builder struct with Pins and the delay timer
- Use the functions provided by Builder to configure the initial state of the LCD1602
- Use the .build_and_init() to convert the Builder to an LCD struct, and initialize the LCD1602
- Use LCD struct:
- LCDBasic trait provides functions close to LCD1602 instructions
- LCDExt trait provides commonly used non-animation functions
- LCDAnimation trait provides simple animation functions
Modules
- the builder pattern to build a LCD
- common enums
- Pin related functions
- common tools
Structs
- The main struct for operating the LCD1602
Traits
- The LCDAnimation trait provides methods for animating the display
- LCDBasic traits provide methods that close to LCD1602 instructions
- LCDExt traits provide common non-animation display methods