Skip to content

Commit

Permalink
Remove GFX (and unused GFX dependencies)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9064 authored and JF002 committed Feb 11, 2024
1 parent 2db9205 commit 4c27442
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 287 deletions.
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ list(APPEND RECOVERY_SOURCE_FILES
systemtask/SystemTask.cpp
systemtask/SystemMonitor.cpp
drivers/TwiMaster.cpp
components/gfx/Gfx.cpp
components/rle/RleDecoder.cpp
components/heartrate/HeartRateController.cpp
heartratetask/HeartRateTask.cpp
Expand Down Expand Up @@ -572,7 +571,6 @@ list(APPEND RECOVERYLOADER_SOURCE_FILES

components/rle/RleDecoder.cpp

components/gfx/Gfx.cpp
drivers/St7789.cpp
components/brightness/BrightnessController.cpp

Expand Down
196 changes: 0 additions & 196 deletions src/components/gfx/Gfx.cpp

This file was deleted.

62 changes: 0 additions & 62 deletions src/components/gfx/Gfx.h

This file was deleted.

1 change: 0 additions & 1 deletion src/displayapp/DisplayAppRecovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <drivers/SpiMaster.h>
#include <bits/unique_ptr.h>
#include <queue.h>
#include "components/gfx/Gfx.h"
#include "drivers/Cst816s.h"
#include <drivers/Watchdog.h>
#include <components/motor/MotorController.h>
Expand Down
21 changes: 0 additions & 21 deletions src/drivers/St7789.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,6 @@ void St7789::DisplayOff() {
nrf_delay_ms(500);
}

void St7789::VerticalScrollDefinition(uint16_t topFixedLines, uint16_t scrollLines, uint16_t bottomFixedLines) {
WriteCommand(static_cast<uint8_t>(Commands::VerticalScrollDefinition));
WriteData(topFixedLines >> 8u);
WriteData(topFixedLines & 0x00ffu);
WriteData(scrollLines >> 8u);
WriteData(scrollLines & 0x00ffu);
WriteData(bottomFixedLines >> 8u);
WriteData(bottomFixedLines & 0x00ffu);
}

void St7789::VerticalScrollStartAddress(uint16_t line) {
verticalScrollingStartAddress = line;
WriteCommand(static_cast<uint8_t>(Commands::VerticalScrollStartAddress));
Expand All @@ -160,17 +150,6 @@ void St7789::VerticalScrollStartAddress(uint16_t line) {
void St7789::Uninit() {
}

void St7789::DrawPixel(uint16_t x, uint16_t y, uint32_t color) {
if (x >= Width || y >= Height) {
return;
}

SetAddrWindow(x, y, x + 1, y + 1);

nrf_gpio_pin_set(pinDataCommand);
WriteSpi(reinterpret_cast<const uint8_t*>(&color), 2);
}

void St7789::DrawBuffer(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t* data, size_t size) {
SetAddrWindow(x, y, x + width - 1, y + height - 1);
nrf_gpio_pin_set(pinDataCommand);
Expand Down
2 changes: 0 additions & 2 deletions src/drivers/St7789.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ namespace Pinetime {

void Init();
void Uninit();
void DrawPixel(uint16_t x, uint16_t y, uint32_t color);

void VerticalScrollDefinition(uint16_t topFixedLines, uint16_t scrollLines, uint16_t bottomFixedLines);
void VerticalScrollStartAddress(uint16_t line);

void DrawBuffer(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t* data, size_t size);
Expand Down
3 changes: 0 additions & 3 deletions src/recoveryLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <libraries/gpiote/app_gpiote.h>
#include <hal/nrf_wdt.h>
#include <cstring>
#include <components/gfx/Gfx.h>
#include <drivers/St7789.h>
#include <components/brightness/BrightnessController.h>
#include <algorithm>
Expand Down Expand Up @@ -48,7 +47,6 @@ Pinetime::Drivers::SpiNorFlash spiNorFlash {flashSpi};
Pinetime::Drivers::Spi lcdSpi {spi, Pinetime::PinMap::SpiLcdCsn};
Pinetime::Drivers::St7789 lcd {lcdSpi, Pinetime::PinMap::LcdDataCommand, Pinetime::PinMap::LcdReset};

Pinetime::Components::Gfx gfx {lcd};
Pinetime::Controllers::BrightnessController brightnessController;

void DisplayProgressBar(uint8_t percent, uint16_t color);
Expand Down Expand Up @@ -92,7 +90,6 @@ void Process(void* /*instance*/) {
spiNorFlash.Wakeup();
brightnessController.Init();
lcd.Init();
gfx.Init();

NRF_LOG_INFO("Display logo")
DisplayLogo();
Expand Down

0 comments on commit 4c27442

Please sign in to comment.