aboutsummaryrefslogtreecommitdiff
path: root/main/InovaLedDisplay.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/InovaLedDisplay.h')
-rw-r--r--main/InovaLedDisplay.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/InovaLedDisplay.h b/main/InovaLedDisplay.h
index a1d9ad9..8b522ab 100644
--- a/main/InovaLedDisplay.h
+++ b/main/InovaLedDisplay.h
@@ -7,12 +7,14 @@
#define NUM_COL 160
-#define NUM_ROW 8
+#define NUM_ROW 24
+#define NUM_SEGMENTS 3
+#define ROWS_PER_SEGMENT NUM_ROW / NUM_SEGMENTS
class InovaLedDisplay : public virtual Adafruit_GFX {
public:
- InovaLedDisplay(uint8_t r0, uint8_t g0, uint8_t clk, uint8_t cs, uint8_t latchParam, uint8_t oeParam, uint8_t addr0Param, uint8_t addr1Param, uint8_t addr2Param);
+ InovaLedDisplay(uint8_t r0, uint8_t g0, uint8_t r1, uint8_t g1, uint8_t r2, uint8_t g2, uint8_t clk, uint8_t latchParam, uint8_t oeParam, uint8_t addr0Param, uint8_t addr1Param, uint8_t addr2Param);
void drawPixel(int16_t x, int16_t y, uint16_t c);
@@ -23,7 +25,7 @@ class InovaLedDisplay : public virtual Adafruit_GFX {
void stopDisplay(void);
private:
- uint16_t displayBuffer[2][NUM_ROW][NUM_COL / 8]; // each column is two bits, so 8 can fit in 16-bit integer
+ uint8_t displayBuffer[2][ROWS_PER_SEGMENT][NUM_COL]; // 3 segments of the matrix packed into bytes
spi_device_handle_t spi;
bool run = true;
bool shouldSwapBuffer = false;