summaryrefslogtreecommitdiff
path: root/src/Components/Gfx/Gfx.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-02-15 15:12:29 +0100
committerJF <jf@codingfield.com>2020-02-15 15:12:29 +0100
commitf30573a9b0fd33290ce13807714d812086ce1398 (patch)
tree249fc3233227afd9da881bdf77392db6bd0c0647 /src/Components/Gfx/Gfx.cpp
parente737fb0499769fa342e4dc267416a7ce5da2574c (diff)
Add support for hardware assisted vertical scrolling.
Diffstat (limited to 'src/Components/Gfx/Gfx.cpp')
-rw-r--r--src/Components/Gfx/Gfx.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Components/Gfx/Gfx.cpp b/src/Components/Gfx/Gfx.cpp
index 0dcb98a6..ed323bc0 100644
--- a/src/Components/Gfx/Gfx.cpp
+++ b/src/Components/Gfx/Gfx.cpp
@@ -30,7 +30,7 @@ void Gfx::ClearScreen() {
void Gfx::FillRectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint16_t color) {
SetBackgroundColor(color);
- state.remainingIterations = 240 + 1;
+ state.remainingIterations = h;
state.currentIteration = 0;
state.busy = true;
state.action = Action::FillRectangle;
@@ -183,4 +183,11 @@ void Gfx::WaitTransfertFinished() const {
ulTaskNotifyTake(pdTRUE, 500);
}
+void Gfx::SetScrollArea(uint16_t topFixedLines, uint16_t scrollLines, uint16_t bottomFixedLines) {
+ lcd.VerticalScrollDefinition(topFixedLines, scrollLines, bottomFixedLines);
+}
+
+void Gfx::SetScrollStartLine(uint16_t line) {
+ lcd.VerticalScrollStartAddress(line);
+}