Skip to content

Commit a776e18

Browse files
committed
clangd
1 parent 51655ff commit a776e18

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

src/drivers/Adafruit_ACeP.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ void Adafruit_ACEP::deGhost() {
149149
}
150150
}
151151

152-
153152
/**************************************************************************/
154153
/*!
155154
@brief clear the display twice to remove any spooky ghost images
@@ -195,7 +194,7 @@ void Adafruit_ACEP::drawPixel(int16_t x, int16_t y, uint16_t color) {
195194
y = _HEIGHT - y - 1;
196195
break;
197196
}
198-
uint32_t addr = ((uint32_t)x + (uint32_t)y*WIDTH)/2;
197+
uint32_t addr = ((uint32_t)x + (uint32_t)y * WIDTH) / 2;
199198
bool lower_nibble = x % 2;
200199
uint8_t color_c;
201200

@@ -213,13 +212,12 @@ void Adafruit_ACEP::drawPixel(int16_t x, int16_t y, uint16_t color) {
213212
*pBuf &= 0x0F; // save lower nib
214213
*pBuf |= (color & 0xF) << 4;
215214
}
216-
215+
217216
if (use_sram) {
218217
sram.write8(colorbuffer_addr + addr, *pBuf);
219218
}
220219
}
221220

222-
223221
/**************************************************************************/
224222
/*!
225223
@brief wait for busy signal to end
@@ -246,7 +244,6 @@ void Adafruit_ACEP::begin(bool reset) {
246244
delay(100);
247245
}
248246

249-
250247
/**************************************************************************/
251248
/*!
252249
@brief Transfer the data stored in the buffer(s) to the display
@@ -268,12 +265,10 @@ void Adafruit_ACEP::display(bool sleep) {
268265
deGhost();
269266
delay(500);
270267

271-
272268
#ifdef EPD_DEBUG
273269
Serial.println(" Powering Up");
274270
#endif
275271

276-
277272
powerUp();
278273

279274
#ifdef EPD_DEBUG
@@ -300,14 +295,13 @@ void Adafruit_ACEP::display(bool sleep) {
300295
}
301296
}
302297

303-
304298
/**************************************************************************/
305299
/*!
306300
@brief signal the display to update
307301
*/
308302
/**************************************************************************/
309303
void Adafruit_ACEP::update(void) {
310-
304+
311305
uint8_t buf[4];
312306

313307
EPD_command(ACEP_POWER_ON);
@@ -352,8 +346,6 @@ void Adafruit_ACEP::powerUp() {
352346
delay(100);
353347
}
354348

355-
356-
357349
/**************************************************************************/
358350
/*!
359351
@brief wind down the display

src/drivers/Adafruit_ACeP.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020
#define ACEP_RESOLUTION 0x61
2121
#define ACEP_PWS 0xE3
2222

23-
#define ACEP_COLOR_BLACK 0x0 /// 000
24-
#define ACEP_COLOR_WHITE 0x1 /// 001
25-
#define ACEP_COLOR_GREEN 0x2 /// 010
26-
#define ACEP_COLOR_BLUE 0x3 /// 011
27-
#define ACEP_COLOR_RED 0x4 /// 100
28-
#define ACEP_COLOR_YELLOW 0x5 /// 101
29-
#define ACEP_COLOR_ORANGE 0x6 /// 110
30-
23+
#define ACEP_COLOR_BLACK 0x0 /// 000
24+
#define ACEP_COLOR_WHITE 0x1 /// 001
25+
#define ACEP_COLOR_GREEN 0x2 /// 010
26+
#define ACEP_COLOR_BLUE 0x3 /// 011
27+
#define ACEP_COLOR_RED 0x4 /// 100
28+
#define ACEP_COLOR_YELLOW 0x5 /// 101
29+
#define ACEP_COLOR_ORANGE 0x6 /// 110
3130

3231
/**************************************************************************/
3332
/*!
@@ -46,14 +45,13 @@ class Adafruit_ACEP : public Adafruit_EPD {
4645
void powerUp();
4746
void powerDown();
4847
void update();
49-
void display(bool sleep=true);
48+
void display(bool sleep = true);
5049

5150
void clearBuffer();
5251
void clearDisplay();
5352
void deGhost();
5453
void drawPixel(int16_t x, int16_t y, uint16_t color);
5554

56-
5755
protected:
5856
uint8_t writeRAMCommand(uint8_t index);
5957
void setRAMAddress(uint16_t x, uint16_t y);

0 commit comments

Comments
 (0)