|
|
@ -1,5 +1,5 @@ |
|
|
|
diff --git a/src/GxEPD2_EPD.cpp b/src/GxEPD2_EPD.cpp
|
|
|
|
index 8df8bef..19b210c 100644
|
|
|
|
index 8df8bef..e9dfb19 100644
|
|
|
|
--- a/src/GxEPD2_EPD.cpp
|
|
|
|
+++ b/src/GxEPD2_EPD.cpp
|
|
|
|
@@ -17,11 +17,10 @@
|
|
|
@ -140,7 +140,7 @@ index 8df8bef..19b210c 100644 |
|
|
|
- if (_cs >= 0) digitalWrite(_cs, HIGH);
|
|
|
|
- if (_dc >= 0) digitalWrite(_dc, HIGH);
|
|
|
|
- _pSPIx->endTransaction();
|
|
|
|
+ _hal->write(c);
|
|
|
|
+ _hal->writeCmd(c);
|
|
|
|
} |
|
|
|
|
|
|
|
void GxEPD2_EPD::_writeData(uint8_t d) |
|
|
@ -313,10 +313,10 @@ index 34c1145..1e8ea64 100644 |
|
|
|
|
|
|
|
diff --git a/src/GxEPD2_Hal.h b/src/GxEPD2_Hal.h
|
|
|
|
new file mode 100644 |
|
|
|
index 0000000..cb8fb9d
|
|
|
|
index 0000000..13424b6
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/GxEPD2_Hal.h
|
|
|
|
@@ -0,0 +1,18 @@
|
|
|
|
@@ -0,0 +1,19 @@
|
|
|
|
+#pragma once
|
|
|
|
+
|
|
|
|
+class GxEPD2_HalInterface {
|
|
|
@ -329,6 +329,7 @@ index 0000000..cb8fb9d |
|
|
|
+ virtual void write(uint8_t buf) = 0;
|
|
|
|
+ virtual void write(const uint8_t *buf, uint16_t n) = 0;
|
|
|
|
+ virtual void write(const uint8_t *buf, uint16_t n, int16_t fill_with_zeroes) = 0;
|
|
|
|
+ virtual void writeCmd(const uint8_t val) = 0;
|
|
|
|
+ virtual void writeCmd(const uint8_t* pCommandData, uint8_t datalen, bool isPGM) = 0;
|
|
|
|
+
|
|
|
|
+ virtual void startTransfer(void) = 0;
|
|
|
|