6 namespace st7567_base {
8 static const char *
const TAG =
"st7567";
16 ESP_LOGD(TAG,
"Initializing ST7567 display...");
20 this->
command(ST7567_DISPLAY_ON);
27 this->
command(ST7567_POWER_CTL | 0x4);
28 this->
command(ST7567_POWER_CTL | 0x6);
29 this->
command(ST7567_POWER_CTL | 0x7);
36 this->
command(ST7567_BOOSTER_ON);
37 this->
command(ST7567_REGULATOR_ON);
40 this->
command(ST7567_SCAN_START_LINE);
45 ESP_LOGD(TAG,
"Performing refresh sequence...");
46 this->
command(ST7567_SW_REFRESH);
82 this->
command(ST7567_SET_EV_CMD);
100 this->
command(ST7567_DISPLAY_ON);
105 this->
command(ST7567_DISPLAY_OFF);
126 uint8_t subpos = y & 0x07;
128 this->
buffer_[pos] |= (1 << subpos);
130 this->
buffer_[pos] &= ~(1 << subpos);
virtual void digital_write(bool value)=0
void set_invert_colors(bool invert_colors)
void fill(Color color) override
void set_brightness(uint8_t val)
virtual void write_display_data()=0
virtual void command(uint8_t value)=0
bool is_on() ESPHOME_ALWAYS_INLINE
const char * model_str_()
void init_internal_(uint32_t buffer_length)
void display_sw_refresh_()
int get_height_internal() override
void clear()
Clear the entire screen by filling it with OFF pixels.
void line(int x1, int y1, int x2, int y2, Color color=COLOR_ON)
Draw a straight line from the point [x1,y1] to [x2,y2] with the given color.
size_t get_buffer_length_()
void set_scroll(uint8_t line)
int get_width_internal() override
void draw_absolute_pixel_internal(int x, int y, Color color) override
void set_contrast(uint8_t val)
void display_init_registers_()
Implementation of SPI Controller mode.
void set_all_pixels_on(bool enable)
void IRAM_ATTR HOT delay(uint32_t ms)