Skip to content

Commit 73a37ca

Browse files
committed
order
1 parent 866b87d commit 73a37ca

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Adafruit_SSD1676.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,25 +150,25 @@ void Adafruit_SSD1676::powerUp() {
150150
busy_wait();
151151

152152
// Set display size and driver output control
153-
buf[0] = 0x27;
154-
buf[1] = 0x01;
153+
buf[0] = (WIDTH-1);
154+
buf[1] = (WIDTH-1) >> 8;
155155
buf[2] = 0x00;
156156
EPD_command(SSD1676_DRIVER_CONTROL, buf, 3);
157157

158158
// Ram data entry mode
159-
buf[0] = 0x01;
159+
buf[0] = 0x03;
160160
EPD_command(SSD1676_DATA_MODE, buf, 1);
161161

162162
// Set ram X start/end postion
163163
buf[0] = 0x01;
164-
buf[1] = 0x10;
164+
buf[1] = HEIGHT / 8;
165165
EPD_command(SSD1676_SET_RAMXPOS, buf, 2);
166166

167167
// Set ram Y start/end postion
168-
buf[0] = 0x27;
169-
buf[1] = 0x01;
170-
buf[2] = 0x00;
171-
buf[3] = 0x00;
168+
buf[2] = (WIDTH-1);
169+
buf[3] = (WIDTH-1) >> 8;
170+
buf[0] = 0x00;
171+
buf[1] = 0x00;
172172
EPD_command(SSD1676_SET_RAMYPOS, buf, 4);
173173

174174
// border color
@@ -201,8 +201,8 @@ void Adafruit_SSD1676::powerUp() {
201201
EPD_command(SSD1676_SET_RAMXCOUNT, buf, 1);
202202

203203
// set RAM y address count
204-
buf[0] = 0x27;
205-
buf[1] = 0x01;
204+
buf[0] = 0 ;
205+
buf[1] = 0;
206206
EPD_command(SSD1676_SET_RAMYCOUNT, buf, 2);
207207

208208
}
@@ -260,7 +260,7 @@ void Adafruit_SSD1676::setRAMAddress(uint16_t x, uint16_t y) {
260260
EPD_command(SSD1676_SET_RAMXCOUNT, buf, 1);
261261

262262
// set RAM y address count
263-
buf[0] = 0x27;
264-
buf[1] = 0x01;
263+
buf[0] =0;
264+
buf[1] = 0;
265265
EPD_command(SSD1676_SET_RAMYCOUNT, buf, 2);
266266
}

0 commit comments

Comments
 (0)