summaryrefslogtreecommitdiff
path: root/src/drivers/St7789.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-01-26 12:37:10 (GMT)
committerJF <jf@codingfield.com>2020-01-26 12:37:10 (GMT)
commit5fa4f5abe0b752bb2d990378e02d6424a1d1b661 (patch)
treebc2e731c488573d678aec1d388a00f754b24fb02 /src/drivers/St7789.cpp
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.cpp')
-rw-r--r--src/drivers/St7789.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp
index 6b66313..39595dc 100644
--- a/src/drivers/St7789.cpp
+++ b/src/drivers/St7789.cpp
@@ -37,8 +37,8 @@ void St7789::WriteData(uint8_t data) {
}
-void St7789::WriteSpi(const uint8_t* data, size_t size, size_t repeat) {
- spi.Write(data, size, repeat);
+void St7789::WriteSpi(const uint8_t* data, size_t size) {
+ spi.Write(data, size);
}
void St7789::SoftwareReset() {
@@ -142,12 +142,8 @@ void St7789::BeginDrawBuffer(uint16_t x, uint16_t y, uint16_t width, uint16_t he
nrf_gpio_pin_set(pinDataCommand);
}
-void St7789::EndDrawBuffer() {
- spi.Wait();
-}
-
-void St7789::NextDrawBuffer(const uint8_t *data, size_t size, size_t repeat) {
- WriteSpi(data, size, repeat);
+void St7789::NextDrawBuffer(const uint8_t *data, size_t size) {
+ WriteSpi(data, size);
}
void St7789::HardwareReset() {
@@ -178,5 +174,3 @@ void St7789::Wakeup() {
NormalModeOn();
DisplayOn();
}
-
-