25 SET_FUNC | EXTENDED_INST,
27 SET_TEMP_COEFF | 0x00,
29 SET_FUNC | BASIC_INST | HORIZONTAL_ADDR,
30 DISPLAY_CNTL | NORMAL_MODE,
76 const uint8_t* bp =
script;
80 while ((cmd = pgm_read_byte(bp++)) !=
SCRIPT_END)
152 uint8_t width = pgm_read_byte(bp++);
153 uint8_t height = pgm_read_byte(bp++);
154 uint8_t lines = (height >> 3);
155 for (uint8_t y = 0; y < lines; y++) {
157 for (uint8_t x = 0; x < width; x++) {
169 uint8_t lines = (height >> 3);
170 for (uint8_t y = 0; y < lines; y++) {
172 for (uint8_t x = 0; x < width; x++) {
185 if (
UNLIKELY(percent > 100)) percent = 100;
186 uint8_t filled = (percent * (width - 2U)) / 100;
187 uint8_t boarder = (
m_y == 0 ? 0x81 : 0x80);
188 width -= (filled + 1);
244 if (
m_x < width) width =
m_x;
uint8_t m_y
Cursor position y.
virtual void display_on()
Sets X-address of RAM (0..83).
void fill(uint8_t data, uint16_t count)
PCD8544(LCD::IO *io, Board::DigitalPin dc=Board::D8, Font *font=&system5x7)
uint8_t m_x
Cursor position x.
virtual int putchar(char c)
OutputPin m_dc
Data/command output pin.
const uint8_t PCD8544::script[] __PROGMEM
virtual void write(uint8_t data)=0
Extended instruction set control.
void draw_bitmap(uint8_t *bp, uint8_t width, uint8_t height)
virtual void display_contrast(uint8_t level)
LCD::IO * m_io
Display adapter.
static const uint8_t LINES
void draw_icon(const uint8_t *bp)
virtual void display_normal()
Sets Y-address of RAM (0..5).
virtual void display_inverse()
static const uint8_t WIDTH
static const uint8_t script[]
virtual void set_cursor(uint8_t x, uint8_t y)
virtual void display_off()
void draw_bar(uint8_t percent, uint8_t width, uint8_t pattern=0x55)
virtual void display_clear()