summaryrefslogtreecommitdiff
path: root/src/Components/Gfx/Gfx.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-01-22 20:08:53 (GMT)
committerJF <jf@codingfield.com>2020-01-22 20:08:53 (GMT)
commiteb7a1b3ac9cbacb74afb7fcd1d40c51a18c90060 (patch)
treea0f886e007080ce0f3867dd7deb87fecd22ab212 /src/Components/Gfx/Gfx.cpp
parentaa3e5c0c6f6f7bb9df02ae5d333dc6c4a6d2e744 (diff)
[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.
Diffstat (limited to 'src/Components/Gfx/Gfx.cpp')
-rw-r--r--src/Components/Gfx/Gfx.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Components/Gfx/Gfx.cpp b/src/Components/Gfx/Gfx.cpp
index 6c19518..9410651 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<const uint8_t *>(buffer), width * 2);
- }
+ lcd.NextDrawBuffer(reinterpret_cast<const uint8_t *>(buffer), width * 2, 240);
lcd.EndDrawBuffer();
}