Skip to content

Commit f5a9222

Browse files
committed
ok SSD1680 (i think) now supported
1 parent a199c24 commit f5a9222

File tree

4 files changed

+13
-29
lines changed

4 files changed

+13
-29
lines changed

Adafruit_EPD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void Adafruit_EPD::begin(bool reset) {
173173
csHigh();
174174

175175
if (!hwSPI) {
176-
Serial.println("softserial");
176+
Serial.println("softserial");
177177
// set pins for software-SPI
178178
pinMode(_sid_pin, OUTPUT);
179179
pinMode(_sclk_pin, OUTPUT);

Adafruit_EPD.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "WProgram.h"
2727
#endif
2828

29-
#define EPD_DEBUG
29+
//#define EPD_DEBUG
3030

3131
#define RAMBUFSIZE 64 ///< size of the ram buffer
3232

@@ -204,6 +204,6 @@ class Adafruit_EPD : public Adafruit_GFX {
204204
#include "Adafruit_IL91874.h"
205205
#include "Adafruit_SSD1608.h"
206206
#include "Adafruit_SSD1675.h"
207-
#include "Adafruit_SSD1676.h"
208207
#include "Adafruit_SSD1675B.h"
208+
#include "Adafruit_SSD1680.h"
209209
#endif /* _Adafruit_EPD_H_ */

Adafruit_SSD1680.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void Adafruit_SSD1680::busy_wait(void) {
103103
/**************************************************************************/
104104
void Adafruit_SSD1680::begin(bool reset) {
105105
Adafruit_EPD::begin(reset);
106-
setBlackBuffer(0, true); // black defaults to inverted
106+
setBlackBuffer(0, true); // black defaults to inverted
107107
setColorBuffer(1, false); // red defaults to un inverted
108108
powerDown();
109109
}
@@ -145,8 +145,8 @@ void Adafruit_SSD1680::powerUp() {
145145
busy_wait();
146146

147147
// Set display size and driver output control
148-
buf[0] = (WIDTH-1);
149-
buf[1] = (WIDTH-1) >> 8;
148+
buf[0] = (WIDTH - 1);
149+
buf[1] = (WIDTH - 1) >> 8;
150150
buf[2] = 0x00;
151151
EPD_command(SSD1680_DRIVER_CONTROL, buf, 3);
152152

@@ -160,8 +160,8 @@ void Adafruit_SSD1680::powerUp() {
160160
EPD_command(SSD1680_SET_RAMXPOS, buf, 2);
161161

162162
// Set ram Y start/end postion
163-
buf[2] = (WIDTH-1);
164-
buf[3] = (WIDTH-1) >> 8;
163+
buf[2] = (WIDTH - 1);
164+
buf[3] = (WIDTH - 1) >> 8;
165165
buf[0] = 0x00;
166166
buf[1] = 0x00;
167167
EPD_command(SSD1680_SET_RAMYPOS, buf, 4);
@@ -196,10 +196,9 @@ void Adafruit_SSD1680::powerUp() {
196196
EPD_command(SSD1680_SET_RAMXCOUNT, buf, 1);
197197

198198
// set RAM y address count
199-
buf[0] = 0 ;
199+
buf[0] = 0;
200200
buf[1] = 0;
201201
EPD_command(SSD1680_SET_RAMYCOUNT, buf, 2);
202-
203202
}
204203

205204
/**************************************************************************/
@@ -255,7 +254,7 @@ void Adafruit_SSD1680::setRAMAddress(uint16_t x, uint16_t y) {
255254
EPD_command(SSD1680_SET_RAMXCOUNT, buf, 1);
256255

257256
// set RAM y address count
258-
buf[0] =0;
257+
buf[0] = 0;
259258
buf[1] = 0;
260259
EPD_command(SSD1680_SET_RAMYCOUNT, buf, 2);
261260
}

Adafruit_SSD1680.h

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#define SSD1680_SET_RAMXCOUNT 0x4E
3535
#define SSD1680_SET_RAMYCOUNT 0x4F
3636

37-
3837
/**************************************************************************/
3938
/*!
4039
@brief Class for interfacing with SSD1680 EPD drivers
@@ -53,33 +52,19 @@ class Adafruit_SSD1680 : public Adafruit_EPD {
5352
void update();
5453
void powerDown();
5554

56-
void Epaper_Write_Command(uint8_t cmd);
57-
void Epaper_Write_CommandR(uint8_t cmd);
58-
void Epaper_Write_Data(uint8_t data);
59-
void Epaper_Spi_WriteByte(uint8_t TxData);
60-
void Epaper_Update_and_Deepsleep(void);
61-
void Epaper_Init(void);
62-
void Display_All_Red(void);
63-
void Display_All_Black(void);
64-
void Display_All_White(void);
65-
void EpaperIO_Init(void);
66-
6755
protected:
6856
uint8_t writeRAMCommand(uint8_t index);
6957
void setRAMAddress(uint16_t x, uint16_t y);
7058
void busy_wait();
7159
};
7260

73-
7461
/*******************************************************************************/
75-
#define MAX_LINE_BYTES 16
76-
#define MAX_COLUMN_BYTES 296
77-
#define ALLSCREEN_BYTES 4736
62+
#define MAX_LINE_BYTES 16
63+
#define MAX_COLUMN_BYTES 296
64+
#define ALLSCREEN_BYTES 4736
7865
#define SPI_OUT 0
7966
#define SPI_IN 1
8067
#define MONO 0
8168
#define RED 1
8269

83-
8470
#endif
85-

0 commit comments

Comments
 (0)