Skip to content

Commit a199c24

Browse files
committed
rename to real chip 1680
1 parent 9dd276d commit a199c24

File tree

2 files changed

+64
-65
lines changed

2 files changed

+64
-65
lines changed

Adafruit_SSD1676.cpp renamed to Adafruit_SSD1680.cpp

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Adafruit_SSD1676.h"
1+
#include "Adafruit_SSD1680.h"
22
#include "Adafruit_EPD.h"
33

44
#define BUSY_WAIT 500
@@ -18,7 +18,7 @@
1818
@param BUSY the busy pin to use
1919
*/
2020
/**************************************************************************/
21-
Adafruit_SSD1676::Adafruit_SSD1676(int width, int height, int8_t SID,
21+
Adafruit_SSD1680::Adafruit_SSD1680(int width, int height, int8_t SID,
2222
int8_t SCLK, int8_t DC, int8_t RST,
2323
int8_t CS, int8_t SRCS, int8_t MISO,
2424
int8_t BUSY)
@@ -57,7 +57,7 @@ Adafruit_SSD1676::Adafruit_SSD1676(int width, int height, int8_t SID,
5757
@param BUSY the busy pin to use
5858
*/
5959
/**************************************************************************/
60-
Adafruit_SSD1676::Adafruit_SSD1676(int width, int height, int8_t DC, int8_t RST,
60+
Adafruit_SSD1680::Adafruit_SSD1680(int width, int height, int8_t DC, int8_t RST,
6161
int8_t CS, int8_t SRCS, int8_t BUSY)
6262
: Adafruit_EPD(width, height, DC, RST, CS, SRCS, BUSY) {
6363
if ((height % 8) != 0) {
@@ -85,7 +85,7 @@ Adafruit_SSD1676::Adafruit_SSD1676(int width, int height, int8_t DC, int8_t RST,
8585
@brief wait for busy signal to end
8686
*/
8787
/**************************************************************************/
88-
void Adafruit_SSD1676::busy_wait(void) {
88+
void Adafruit_SSD1680::busy_wait(void) {
8989
if (_busy_pin >= 0) {
9090
while (digitalRead(_busy_pin)) { // wait for busy low
9191
delay(10);
@@ -101,7 +101,7 @@ void Adafruit_SSD1676::busy_wait(void) {
101101
@param reset if true the reset pin will be toggled.
102102
*/
103103
/**************************************************************************/
104-
void Adafruit_SSD1676::begin(bool reset) {
104+
void Adafruit_SSD1680::begin(bool reset) {
105105
Adafruit_EPD::begin(reset);
106106
setBlackBuffer(0, true); // black defaults to inverted
107107
setColorBuffer(1, false); // red defaults to un inverted
@@ -113,14 +113,14 @@ void Adafruit_SSD1676::begin(bool reset) {
113113
@brief signal the display to update
114114
*/
115115
/**************************************************************************/
116-
void Adafruit_SSD1676::update() {
116+
void Adafruit_SSD1680::update() {
117117
uint8_t buf[1];
118118

119119
// display update sequence
120120
buf[0] = 0xF4;
121-
EPD_command(SSD1676_DISP_CTRL2, buf, 1);
121+
EPD_command(SSD1680_DISP_CTRL2, buf, 1);
122122

123-
EPD_command(SSD1676_MASTER_ACTIVATE);
123+
EPD_command(SSD1680_MASTER_ACTIVATE);
124124
busy_wait();
125125

126126
if (_busy_pin <= -1) {
@@ -133,72 +133,72 @@ void Adafruit_SSD1676::update() {
133133
@brief start up the display
134134
*/
135135
/**************************************************************************/
136-
void Adafruit_SSD1676::powerUp() {
136+
void Adafruit_SSD1680::powerUp() {
137137
uint8_t buf[5];
138138

139139
hardwareReset();
140140
delay(100);
141141
busy_wait();
142142

143143
// soft reset
144-
EPD_command(SSD1676_SW_RESET);
144+
EPD_command(SSD1680_SW_RESET);
145145
busy_wait();
146146

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

153153
// Ram data entry mode
154154
buf[0] = 0x03;
155-
EPD_command(SSD1676_DATA_MODE, buf, 1);
155+
EPD_command(SSD1680_DATA_MODE, buf, 1);
156156

157157
// Set ram X start/end postion
158158
buf[0] = 0x01;
159159
buf[1] = HEIGHT / 8;
160-
EPD_command(SSD1676_SET_RAMXPOS, buf, 2);
160+
EPD_command(SSD1680_SET_RAMXPOS, buf, 2);
161161

162162
// Set ram Y start/end postion
163163
buf[2] = (WIDTH-1);
164164
buf[3] = (WIDTH-1) >> 8;
165165
buf[0] = 0x00;
166166
buf[1] = 0x00;
167-
EPD_command(SSD1676_SET_RAMYPOS, buf, 4);
167+
EPD_command(SSD1680_SET_RAMYPOS, buf, 4);
168168

169169
// border color
170170
buf[0] = 0x05;
171-
EPD_command(SSD1676_WRITE_BORDER, buf, 1);
171+
EPD_command(SSD1680_WRITE_BORDER, buf, 1);
172172

173173
// Vcom Voltage
174174
buf[0] = 0x36;
175-
EPD_command(SSD1676_WRITE_VCOM, buf, 1);
175+
EPD_command(SSD1680_WRITE_VCOM, buf, 1);
176176

177177
// Set gate voltage
178178
buf[0] = 0x17;
179-
EPD_command(SSD1676_GATE_VOLTAGE, buf, 1);
179+
EPD_command(SSD1680_GATE_VOLTAGE, buf, 1);
180180

181181
// Set source voltage
182182
buf[0] = 0x41;
183183
buf[1] = 0x00;
184184
buf[2] = 0x32;
185-
EPD_command(SSD1676_SOURCE_VOLTAGE, buf, 3);
185+
EPD_command(SSD1680_SOURCE_VOLTAGE, buf, 3);
186186

187187
// Set LUT
188188
/*
189189
buf[0] = LUT_DATA[74];
190-
EPD_command(SSD1676_WRITE_LUT, buf, 1);
191-
EPD_command(SSD1676_WRITE_LUT, LUT_DATA, 70);
190+
EPD_command(SSD1680_WRITE_LUT, buf, 1);
191+
EPD_command(SSD1680_WRITE_LUT, LUT_DATA, 70);
192192
*/
193193

194194
// set RAM x address count
195195
buf[0] = 1;
196-
EPD_command(SSD1676_SET_RAMXCOUNT, buf, 1);
196+
EPD_command(SSD1680_SET_RAMXCOUNT, buf, 1);
197197

198198
// set RAM y address count
199199
buf[0] = 0 ;
200200
buf[1] = 0;
201-
EPD_command(SSD1676_SET_RAMYCOUNT, buf, 2);
201+
EPD_command(SSD1680_SET_RAMYCOUNT, buf, 2);
202202

203203
}
204204

@@ -207,16 +207,16 @@ void Adafruit_SSD1676::powerUp() {
207207
@brief wind down the display
208208
*/
209209
/**************************************************************************/
210-
void Adafruit_SSD1676::powerDown() {
210+
void Adafruit_SSD1680::powerDown() {
211211
uint8_t buf[1];
212212
// Only deep sleep if we can get out of it
213213
if (_reset_pin >= 0) {
214214
// deep sleep
215215
buf[0] = 0x01;
216-
EPD_command(SSD1676_DEEP_SLEEP, buf, 1);
216+
EPD_command(SSD1680_DEEP_SLEEP, buf, 1);
217217
delay(100);
218218
} else {
219-
EPD_command(SSD1676_SW_RESET);
219+
EPD_command(SSD1680_SW_RESET);
220220
busy_wait();
221221
}
222222
}
@@ -230,12 +230,12 @@ void Adafruit_SSD1676::powerDown() {
230230
command
231231
*/
232232
/**************************************************************************/
233-
uint8_t Adafruit_SSD1676::writeRAMCommand(uint8_t index) {
233+
uint8_t Adafruit_SSD1680::writeRAMCommand(uint8_t index) {
234234
if (index == 0) {
235-
return EPD_command(SSD1676_WRITE_RAM1, false);
235+
return EPD_command(SSD1680_WRITE_RAM1, false);
236236
}
237237
if (index == 1) {
238-
return EPD_command(SSD1676_WRITE_RAM2, false);
238+
return EPD_command(SSD1680_WRITE_RAM2, false);
239239
}
240240
return 0;
241241
}
@@ -247,15 +247,15 @@ uint8_t Adafruit_SSD1676::writeRAMCommand(uint8_t index) {
247247
@param y Y address counter value
248248
*/
249249
/**************************************************************************/
250-
void Adafruit_SSD1676::setRAMAddress(uint16_t x, uint16_t y) {
250+
void Adafruit_SSD1680::setRAMAddress(uint16_t x, uint16_t y) {
251251
uint8_t buf[2];
252252

253253
// set RAM x address count
254254
buf[0] = 1;
255-
EPD_command(SSD1676_SET_RAMXCOUNT, buf, 1);
255+
EPD_command(SSD1680_SET_RAMXCOUNT, buf, 1);
256256

257257
// set RAM y address count
258258
buf[0] =0;
259259
buf[1] = 0;
260-
EPD_command(SSD1676_SET_RAMYCOUNT, buf, 2);
260+
EPD_command(SSD1680_SET_RAMYCOUNT, buf, 2);
261261
}

Adafruit_SSD1676.h renamed to Adafruit_SSD1680.h

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,51 @@
1-
#ifndef LIB_ADAFRUIT_SSD1676
2-
#define LIB_ADAFRUIT_SSD1676
1+
#ifndef LIB_ADAFRUIT_SSD1680
2+
#define LIB_ADAFRUIT_SSD1680
33

44
#include "Adafruit_EPD.h"
55
#include <Arduino.h>
66

77
#define EPD_RAM_BW 0x10
88
#define EPD_RAM_RED 0x13
99

10-
#define SSD1676_DRIVER_CONTROL 0x01
11-
#define SSD1676_GATE_VOLTAGE 0x03
12-
#define SSD1676_SOURCE_VOLTAGE 0x04
13-
#define SSD1676_PROGOTP_INITIAL 0x08
14-
#define SSD1676_PROGREG_INITIAL 0x09
15-
#define SSD1676_READREG_INITIAL 0x0A
16-
#define SSD1676_BOOST_SOFTSTART 0x0C
17-
#define SSD1676_DEEP_SLEEP 0x10
18-
#define SSD1676_DATA_MODE 0x11
19-
#define SSD1676_SW_RESET 0x12
20-
#define SSD1676_TEMP_CONTROL 0x18
21-
#define SSD1676_TEMP_WRITE 0x1A
22-
#define SSD1676_MASTER_ACTIVATE 0x20
23-
#define SSD1676_DISP_CTRL1 0x21
24-
#define SSD1676_DISP_CTRL2 0x22
25-
#define SSD1676_WRITE_RAM1 0x24
26-
#define SSD1676_WRITE_RAM2 0x26
27-
#define SSD1676_WRITE_VCOM 0x2C
28-
#define SSD1676_READ_OTP 0x2D
29-
#define SSD1676_READ_STATUS 0x2F
30-
#define SSD1676_WRITE_LUT 0x32
31-
#define SSD1676_WRITE_BORDER 0x3C
32-
#define SSD1676_SET_RAMXPOS 0x44
33-
#define SSD1676_SET_RAMYPOS 0x45
34-
#define SSD1676_SET_RAMXCOUNT 0x4E
35-
#define SSD1676_SET_RAMYCOUNT 0x4F
36-
//#define SSD1676_SET_ANALOGBLOCK 0x74
37-
//#define SSD1676_SET_DIGITALBLOCK 0x7E
10+
#define SSD1680_DRIVER_CONTROL 0x01
11+
#define SSD1680_GATE_VOLTAGE 0x03
12+
#define SSD1680_SOURCE_VOLTAGE 0x04
13+
#define SSD1680_PROGOTP_INITIAL 0x08
14+
#define SSD1680_PROGREG_INITIAL 0x09
15+
#define SSD1680_READREG_INITIAL 0x0A
16+
#define SSD1680_BOOST_SOFTSTART 0x0C
17+
#define SSD1680_DEEP_SLEEP 0x10
18+
#define SSD1680_DATA_MODE 0x11
19+
#define SSD1680_SW_RESET 0x12
20+
#define SSD1680_TEMP_CONTROL 0x18
21+
#define SSD1680_TEMP_WRITE 0x1A
22+
#define SSD1680_MASTER_ACTIVATE 0x20
23+
#define SSD1680_DISP_CTRL1 0x21
24+
#define SSD1680_DISP_CTRL2 0x22
25+
#define SSD1680_WRITE_RAM1 0x24
26+
#define SSD1680_WRITE_RAM2 0x26
27+
#define SSD1680_WRITE_VCOM 0x2C
28+
#define SSD1680_READ_OTP 0x2D
29+
#define SSD1680_READ_STATUS 0x2F
30+
#define SSD1680_WRITE_LUT 0x32
31+
#define SSD1680_WRITE_BORDER 0x3C
32+
#define SSD1680_SET_RAMXPOS 0x44
33+
#define SSD1680_SET_RAMYPOS 0x45
34+
#define SSD1680_SET_RAMXCOUNT 0x4E
35+
#define SSD1680_SET_RAMYCOUNT 0x4F
36+
3837

3938
/**************************************************************************/
4039
/*!
41-
@brief Class for interfacing with SSD1676 EPD drivers
40+
@brief Class for interfacing with SSD1680 EPD drivers
4241
*/
4342
/**************************************************************************/
44-
class Adafruit_SSD1676 : public Adafruit_EPD {
43+
class Adafruit_SSD1680 : public Adafruit_EPD {
4544
public:
46-
Adafruit_SSD1676(int width, int height, int8_t SID, int8_t SCLK, int8_t DC,
45+
Adafruit_SSD1680(int width, int height, int8_t SID, int8_t SCLK, int8_t DC,
4746
int8_t RST, int8_t CS, int8_t SRCS, int8_t MISO,
4847
int8_t BUSY = -1);
49-
Adafruit_SSD1676(int width, int height, int8_t DC, int8_t RST, int8_t CS,
48+
Adafruit_SSD1680(int width, int height, int8_t DC, int8_t RST, int8_t CS,
5049
int8_t SRCS, int8_t BUSY = -1);
5150

5251
void begin(bool reset = true);

0 commit comments

Comments
 (0)