Skip to content

Commit 4c27442

Browse files
mark9064JF002
authored andcommitted
Remove GFX (and unused GFX dependencies)
1 parent 2db9205 commit 4c27442

File tree

7 files changed

+0
-287
lines changed

7 files changed

+0
-287
lines changed

src/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ list(APPEND RECOVERY_SOURCE_FILES
542542
systemtask/SystemTask.cpp
543543
systemtask/SystemMonitor.cpp
544544
drivers/TwiMaster.cpp
545-
components/gfx/Gfx.cpp
546545
components/rle/RleDecoder.cpp
547546
components/heartrate/HeartRateController.cpp
548547
heartratetask/HeartRateTask.cpp
@@ -572,7 +571,6 @@ list(APPEND RECOVERYLOADER_SOURCE_FILES
572571

573572
components/rle/RleDecoder.cpp
574573

575-
components/gfx/Gfx.cpp
576574
drivers/St7789.cpp
577575
components/brightness/BrightnessController.cpp
578576

src/components/gfx/Gfx.cpp

-196
This file was deleted.

src/components/gfx/Gfx.h

-62
This file was deleted.

src/displayapp/DisplayAppRecovery.h

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <drivers/SpiMaster.h>
66
#include <bits/unique_ptr.h>
77
#include <queue.h>
8-
#include "components/gfx/Gfx.h"
98
#include "drivers/Cst816s.h"
109
#include <drivers/Watchdog.h>
1110
#include <components/motor/MotorController.h>

src/drivers/St7789.cpp

-21
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,6 @@ void St7789::DisplayOff() {
140140
nrf_delay_ms(500);
141141
}
142142

143-
void St7789::VerticalScrollDefinition(uint16_t topFixedLines, uint16_t scrollLines, uint16_t bottomFixedLines) {
144-
WriteCommand(static_cast<uint8_t>(Commands::VerticalScrollDefinition));
145-
WriteData(topFixedLines >> 8u);
146-
WriteData(topFixedLines & 0x00ffu);
147-
WriteData(scrollLines >> 8u);
148-
WriteData(scrollLines & 0x00ffu);
149-
WriteData(bottomFixedLines >> 8u);
150-
WriteData(bottomFixedLines & 0x00ffu);
151-
}
152-
153143
void St7789::VerticalScrollStartAddress(uint16_t line) {
154144
verticalScrollingStartAddress = line;
155145
WriteCommand(static_cast<uint8_t>(Commands::VerticalScrollStartAddress));
@@ -160,17 +150,6 @@ void St7789::VerticalScrollStartAddress(uint16_t line) {
160150
void St7789::Uninit() {
161151
}
162152

163-
void St7789::DrawPixel(uint16_t x, uint16_t y, uint32_t color) {
164-
if (x >= Width || y >= Height) {
165-
return;
166-
}
167-
168-
SetAddrWindow(x, y, x + 1, y + 1);
169-
170-
nrf_gpio_pin_set(pinDataCommand);
171-
WriteSpi(reinterpret_cast<const uint8_t*>(&color), 2);
172-
}
173-
174153
void St7789::DrawBuffer(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t* data, size_t size) {
175154
SetAddrWindow(x, y, x + width - 1, y + height - 1);
176155
nrf_gpio_pin_set(pinDataCommand);

src/drivers/St7789.h

-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ namespace Pinetime {
1616

1717
void Init();
1818
void Uninit();
19-
void DrawPixel(uint16_t x, uint16_t y, uint32_t color);
2019

21-
void VerticalScrollDefinition(uint16_t topFixedLines, uint16_t scrollLines, uint16_t bottomFixedLines);
2220
void VerticalScrollStartAddress(uint16_t line);
2321

2422
void DrawBuffer(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t* data, size_t size);

src/recoveryLoader.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <libraries/gpiote/app_gpiote.h>
1111
#include <hal/nrf_wdt.h>
1212
#include <cstring>
13-
#include <components/gfx/Gfx.h>
1413
#include <drivers/St7789.h>
1514
#include <components/brightness/BrightnessController.h>
1615
#include <algorithm>
@@ -48,7 +47,6 @@ Pinetime::Drivers::SpiNorFlash spiNorFlash {flashSpi};
4847
Pinetime::Drivers::Spi lcdSpi {spi, Pinetime::PinMap::SpiLcdCsn};
4948
Pinetime::Drivers::St7789 lcd {lcdSpi, Pinetime::PinMap::LcdDataCommand, Pinetime::PinMap::LcdReset};
5049

51-
Pinetime::Components::Gfx gfx {lcd};
5250
Pinetime::Controllers::BrightnessController brightnessController;
5351

5452
void DisplayProgressBar(uint8_t percent, uint16_t color);
@@ -92,7 +90,6 @@ void Process(void* /*instance*/) {
9290
spiNorFlash.Wakeup();
9391
brightnessController.Init();
9492
lcd.Init();
95-
gfx.Init();
9693

9794
NRF_LOG_INFO("Display logo")
9895
DisplayLogo();

0 commit comments

Comments
 (0)