@@ -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) {
0 commit comments