7static const char *
const TAG =
"st7567_i2c";
10 ESP_LOGCONFIG(TAG,
"Setting up I2C ST7567 display...");
13 auto err = this->
write(
nullptr, 0);
23 LOG_DISPLAY(
"",
"I2CST7567",
this);
25 ESP_LOGCONFIG(TAG,
" Model: %s", this->
model_str_());
27 ESP_LOGCONFIG(TAG,
" Mirror X: %s", YESNO(this->
mirror_x_));
28 ESP_LOGCONFIG(TAG,
" Mirror Y: %s", YESNO(this->
mirror_y_));
29 ESP_LOGCONFIG(TAG,
" Invert Colors: %s", YESNO(this->
invert_colors_));
30 LOG_UPDATE_INTERVAL(
this);
33 ESP_LOGE(TAG,
"Communication with I2C ST7567 failed!");
46 this->
command(esphome::st7567_base::ST7567_PAGE_ADDR +
y);
47 this->
command(esphome::st7567_base::ST7567_COL_ADDR_H);
50 static const size_t BLOCK_SIZE = 64;
virtual void mark_failed()
Mark this component as failed.
ErrorCode write_register(uint8_t a_register, const uint8_t *data, size_t len, bool stop=true)
writes an array of bytes to a specific register in the I²C device
ErrorCode write(const uint8_t *data, size_t len, bool stop=true)
writes an array of bytes to a device using an I2CBus
bool write_byte(uint8_t a_register, uint8_t data, bool stop=true)
const char * model_str_()
int get_height_internal() override
int get_width_internal() override
void command(uint8_t value) override
void write_display_data() override
void dump_config() override
@ ERROR_OK
No error found during execution of method.
Providing packet encoding functions for exchanging data with a remote host.