summaryrefslogtreecommitdiff
path: root/src/drivers/St7789.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-01-26 13:37:10 +0100
committerJF <jf@codingfield.com>2020-01-26 13:37:10 +0100
commit5fa4f5abe0b752bb2d990378e02d6424a1d1b661 (patch)
treebc2e731c488573d678aec1d388a00f754b24fb02 /src/drivers/St7789.h
parenteb7a1b3ac9cbacb74afb7fcd1d40c51a18c90060 (diff)
Better integration of SPI with DMA and IRQ. Using only 'End' IRQ. Perf could be improved by using 'Started' IRQ to prepare the next buffer while the current one is beeing sent.
Diffstat (limited to 'src/drivers/St7789.h')
-rw-r--r--src/drivers/St7789.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/drivers/St7789.h b/src/drivers/St7789.h
index eef051b7..9ecf9f27 100644
--- a/src/drivers/St7789.h
+++ b/src/drivers/St7789.h
@@ -12,16 +12,13 @@ namespace Pinetime {
void DrawPixel(uint16_t x, uint16_t y, uint32_t color);
void BeginDrawBuffer(uint16_t x, uint16_t y, uint16_t width, uint16_t height);
- void NextDrawBuffer(const uint8_t* data, size_t size, size_t repeat = 0);
- void EndDrawBuffer();
+ void NextDrawBuffer(const uint8_t* data, size_t size);
void DisplayOn();
void DisplayOff();
void Sleep();
void Wakeup();
-
-
private:
SpiMaster& spi;
uint8_t pinDataCommand;
@@ -35,12 +32,9 @@ namespace Pinetime {
void DisplayInversionOn();
void NormalModeOn();
void WriteToRam();
-
-
void SetAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
-
void WriteCommand(uint8_t cmd);
- void WriteSpi(const uint8_t* data, size_t size, size_t repeat = 0);
+ void WriteSpi(const uint8_t* data, size_t size);
enum class Commands : uint8_t {
SoftwareReset = 0x01,
@@ -62,7 +56,6 @@ namespace Pinetime {
static constexpr uint16_t Width = 240;
static constexpr uint16_t Height = 240;
void RowAddressSet();
-
};
}
}