mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-07 13:24:56 +02:00
[ili9xxx] Implement st7735 support (#6838)
This commit is contained in:
@@ -411,11 +411,19 @@ void ILI9XXXDisplay::init_lcd_(const uint8_t *addr) {
|
||||
uint8_t cmd, x, num_args;
|
||||
while ((cmd = *addr++) != 0) {
|
||||
x = *addr++;
|
||||
num_args = x & 0x7F;
|
||||
this->send_command(cmd, addr, num_args);
|
||||
addr += num_args;
|
||||
if (x & 0x80)
|
||||
delay(150); // NOLINT
|
||||
if (cmd == ILI9XXX_DELAY) {
|
||||
ESP_LOGD(TAG, "Delay %dms", x);
|
||||
delay(x);
|
||||
} else {
|
||||
num_args = x & 0x7F;
|
||||
ESP_LOGD(TAG, "Command %02X, length %d, bits %02X", cmd, num_args, *addr);
|
||||
this->send_command(cmd, addr, num_args);
|
||||
addr += num_args;
|
||||
if (x & 0x80) {
|
||||
ESP_LOGD(TAG, "Delay 150ms");
|
||||
delay(150); // NOLINT
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user