28 SET_DISPLAY_START | 0,
29 SET_POWER_CONTROL | 0x04,
31 SET_POWER_CONTROL | 0x06,
33 SET_POWER_CONTROL | 0x07,
35 SET_RESISTOR_RATIO | 0x06,
39 DISPLAY_64X128_POINTS,
84 const uint8_t* bp =
script;
88 while ((cmd = pgm_read_byte(bp++)) !=
SCRIPT_END) {
90 uint8_t ms = pgm_read_byte(bp++);
146 for (uint8_t y = 0; y <
LINES; y++) {
167 uint8_t width = pgm_read_byte(bp++);
168 uint8_t height = pgm_read_byte(bp++);
169 uint8_t lines = (height >> 3);
170 for (uint8_t y = 0; y < lines; y++) {
172 for (uint8_t x = 0; x < width; x++) {
184 uint8_t lines = (height >> 3);
185 for (uint8_t y = 0; y < lines; y++) {
187 for (uint8_t x = 0; x < width; x++) {
199 if (
UNLIKELY(percent > 100)) percent = 100;
200 uint8_t filled = (percent * (width - 2U)) / 100;
201 uint8_t boarder = (
m_y == 0 ? 0x81 : 0x80);
202 width -= (filled + 1);
237 if (y == 0) y = 7;
else y = y - 1;
269 if (
m_x < width) width =
m_x;
uint8_t m_y
Cursor position y.
uint8_t m_x
Cursor position x.
virtual int putchar(char c)
uint8_t m_line
Display start line.
void draw_bar(uint8_t percent, uint8_t width, uint8_t pattern=0x55)
static const uint8_t WIDTH
static const uint8_t LINES
virtual void write(uint8_t data)=0
IOStream & tab(IOStream &outs)
void fill(uint8_t data, uint16_t count)
void draw_bitmap(uint8_t *bp, uint8_t width, uint8_t height)
virtual void display_inverse()
static const uint8_t script[]
virtual void display_contrast(uint8_t level)
virtual void display_clear()
void(* delay)(uint32_t ms)
OutputPin m_dc
Data(1) or command(0).
void draw_icon(const uint8_t *bp)
Set column address (2x4 bits).
virtual void set_cursor(uint8_t x, uint8_t y)
virtual void display_off()
ST7565(LCD::IO *io, Board::DigitalPin dc=Board::D8, Font *font=&system5x7)
Set output voltage volume register.
virtual void display_on()
LCD::IO * m_io
Display adapter.
virtual void display_normal()
const uint8_t ST7565::script[] __PROGMEM