3
3
4
4
#define BUSY_WAIT 500
5
5
6
-
7
6
// clang-format off
8
7
9
8
const uint8_t acep_default_init_code[] {
@@ -21,7 +20,6 @@ const uint8_t acep_default_init_code[] {
21
20
22
21
// clang-format on
23
22
24
-
25
23
/* *************************************************************************/
26
24
/* !
27
25
@brief constructor if using external SRAM chip and software SPI
@@ -37,10 +35,9 @@ const uint8_t acep_default_init_code[] {
37
35
@param BUSY the busy pin to use
38
36
*/
39
37
/* *************************************************************************/
40
- Adafruit_ACEP::Adafruit_ACEP (int width, int height, int8_t SID,
41
- int8_t SCLK, int8_t DC, int8_t RST,
42
- int8_t CS, int8_t SRCS, int8_t MISO,
43
- int8_t BUSY)
38
+ Adafruit_ACEP::Adafruit_ACEP (int width, int height, int8_t SID, int8_t SCLK,
39
+ int8_t DC, int8_t RST, int8_t CS, int8_t SRCS,
40
+ int8_t MISO, int8_t BUSY)
44
41
: Adafruit_EPD(width, height, SID, SCLK, DC, RST, CS, SRCS, MISO, BUSY) {
45
42
46
43
if ((width % 8 ) != 0 ) {
@@ -59,7 +56,6 @@ Adafruit_ACEP::Adafruit_ACEP(int width, int height, int8_t SID,
59
56
}
60
57
61
58
singleByteTxns = true ;
62
-
63
59
}
64
60
65
61
// constructor for hardware SPI - we indicate DataCommand, ChipSelect, Reset
@@ -77,8 +73,7 @@ Adafruit_ACEP::Adafruit_ACEP(int width, int height, int8_t SID,
77
73
*/
78
74
/* *************************************************************************/
79
75
Adafruit_ACEP::Adafruit_ACEP (int width, int height, int8_t DC, int8_t RST,
80
- int8_t CS, int8_t SRCS, int8_t BUSY,
81
- SPIClass *spi)
76
+ int8_t CS, int8_t SRCS, int8_t BUSY, SPIClass *spi)
82
77
: Adafruit_EPD(width, height, DC, RST, CS, SRCS, BUSY, spi) {
83
78
84
79
if ((height % 8 ) != 0 ) {
@@ -106,7 +101,7 @@ Adafruit_ACEP::Adafruit_ACEP(int width, int height, int8_t DC, int8_t RST,
106
101
/* *************************************************************************/
107
102
void Adafruit_ACEP::busy_wait (void ) {
108
103
if (_busy_pin >= 0 ) {
109
- while (! digitalRead (_busy_pin)) { // wait for busy high
104
+ while (!digitalRead (_busy_pin)) { // wait for busy high
110
105
delay (10 );
111
106
}
112
107
} else {
@@ -169,9 +164,9 @@ void Adafruit_ACEP::update() {
169
164
buf[3 ] = 0xC0 ;
170
165
EPD_command (ACEP_RESOLUTION, buf, 4 );
171
166
EPD_command (ACEP_DTM);
172
- for (int i= 0 ; i< 134400 / 256 ; i++) {
167
+ for (int i = 0 ; i < 134400 / 256 ; i++) {
173
168
uint8_t block[256 ];
174
- memset (block, ((i % 6 ) << 4 ) | (i %6 ), 256 );
169
+ memset (block, ((i % 6 ) << 4 ) | (i % 6 ), 256 );
175
170
EPD_data (block, 256 );
176
171
}
177
172
EPD_command (ACEP_POWER_ON);
@@ -241,6 +236,4 @@ uint8_t Adafruit_ACEP::writeRAMCommand(uint8_t index) {
241
236
@param y Y address counter value
242
237
*/
243
238
/* *************************************************************************/
244
- void Adafruit_ACEP::setRAMAddress (uint16_t x, uint16_t y) {
245
-
246
- }
239
+ void Adafruit_ACEP::setRAMAddress (uint16_t x, uint16_t y) {}
0 commit comments