invert display option (#2232)

* invert display option

* text fix, format code
This commit is contained in:
Totoo 2024-09-07 10:58:57 +02:00 committed by GitHub
parent e6afd7744d
commit 87069f11e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 65 additions and 15 deletions

View file

@ -307,6 +307,14 @@ void ILI9341::wake() {
lcd_wake();
}
void ILI9341::set_inverted(bool invert) {
if (invert) {
io.lcd_data_write_command_and_data(0x21, {});
} else {
io.lcd_data_write_command_and_data(0x20, {});
}
}
void ILI9341::fill_rectangle(ui::Rect r, const ui::Color c) {
const auto r_clipped = r.intersect(screen_rect());
if (!r_clipped.is_empty()) {