Skip to content

Commit de11cf7

Browse files
Laurence BankLaurence Bank
authored andcommitted
Fixed typos found when compiling in idf
1 parent d4e7241 commit de11cf7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/FastEPD.inl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,11 @@ void bbepPCALDigitalWrite(uint8_t pin, uint8_t value)
380380
uint8_t port = pin / 8;
381381
pin &= 7;
382382

383-
value ? ioRegs[PCAL6416A_OUTPORT0_ARRAY + port] |= (1 << pin) : ioRegs[PCAL6416A_OUTPORT0_ARRAY + port] &= ~(1 << pin);
383+
if (value) {
384+
ioRegs[PCAL6416A_OUTPORT0_ARRAY + port] |= (1 << pin);
385+
} else {
386+
ioRegs[PCAL6416A_OUTPORT0_ARRAY + port] &= ~(1 << pin);
387+
}
384388
ucTemp[0] = PCAL6416A_OUTPORT0_ARRAY + port;
385389
ucTemp[1] = ioRegs[PCAL6416A_OUTPORT0_ARRAY + port];
386390
bbepI2CWrite(0x20, ucTemp, 2);
@@ -1208,7 +1212,7 @@ int bbepFullUpdate(FASTEPDSTATE *pState, bool bFast, bool bKeepOn, BBEPRECT *pRe
12081212
int dy; // destination Y for flipped displays
12091213
for (int i = 0; i < pState->native_height; i++) {
12101214
s = &pState->pCurrent[i * (pState->native_width/8)];
1211-
dy = (pState->iFlags & BB_PANEL_FLAG_MIRROR_Y) ? dy = pState->native_height - 1 - i : dy = i;
1215+
dy = (pState->iFlags & BB_PANEL_FLAG_MIRROR_Y) ? pState->native_height - 1 - i : i;
12121216
d = &pState->pTemp[dy * (pState->native_width/4)];
12131217
memcpy(&pState->pPrevious[i * (pState->native_width/8)], s, pState->native_width / 8); // previous = current
12141218
if (pState->iFlags & BB_PANEL_FLAG_MIRROR_X) {
@@ -1245,7 +1249,7 @@ int bbepFullUpdate(FASTEPDSTATE *pState, bool bFast, bool bKeepOn, BBEPRECT *pRe
12451249
uint8_t *s, *d;
12461250
bbepRowControl(pState, ROW_START);
12471251
for (int i = 0; i < pState->native_height; i++) {
1248-
dy = (pState->iFlags & BB_PANEL_FLAG_MIRROR_Y) ? dy = pState->native_height - 1 - i : dy = i;
1252+
dy = (pState->iFlags & BB_PANEL_FLAG_MIRROR_Y) ? pState->native_height - 1 - i : i;
12491253
s = &pState->pCurrent[(pState->native_width/8) * dy];
12501254
d = pState->dma_buf;
12511255
if (pState->iFlags & BB_PANEL_FLAG_MIRROR_X) {

src/arduino_io.inl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#define INPUT 1
3535
#define INPUT_PULLUP 2
3636
#define OUTPUT 3
37+
#define INPUT_PULLDOWN 4
3738
unsigned long IRAM_ATTR micros(void)
3839
{
3940
return (unsigned long)(esp_timer_get_time());

0 commit comments

Comments
 (0)