From eb7a1b3ac9cbacb74afb7fcd1d40c51a18c90060 Mon Sep 17 00:00:00 2001 From: JF Date: Wed, 22 Jan 2020 21:08:53 +0100 Subject: [WIP] Max SPI speed reached (119ms for a full refresh. Theo max : 240*240*16 = 115.2ms) using IRQ and DMA. Code needs some cleaning before integration. --- src/Components/Gfx/Gfx.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Components/Gfx/Gfx.cpp') diff --git a/src/Components/Gfx/Gfx.cpp b/src/Components/Gfx/Gfx.cpp index 6c19518a..94106513 100644 --- a/src/Components/Gfx/Gfx.cpp +++ b/src/Components/Gfx/Gfx.cpp @@ -22,9 +22,7 @@ void Gfx::ClearScreen() { void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint16_t color) { SetBackgroundColor(color); lcd.BeginDrawBuffer(0, 0, width, height); - for(int i = 0; i < height; i++) { - lcd.NextDrawBuffer(reinterpret_cast(buffer), width * 2); - } + lcd.NextDrawBuffer(reinterpret_cast(buffer), width * 2, 240); lcd.EndDrawBuffer(); } -- cgit v1.2.3-70-g09d2