diff --git a/PCAL6416A.py b/PCAL6416A.py index 26aa0f9..2d4b57a 100644 --- a/PCAL6416A.py +++ b/PCAL6416A.py @@ -196,4 +196,6 @@ def digitalWrite(self, value): self.PCAL6416A.digitalWrite(self.pin,value) def digitalRead(self): - return self.PCAL6416A.digitalRead(self.pin) \ No newline at end of file + return self.PCAL6416A.digitalRead(self.pin) + + __call__ = digitalRead diff --git a/inkplate6_COLOR.py b/inkplate6_COLOR.py index 494d518..aa34d30 100644 --- a/inkplate6_COLOR.py +++ b/inkplate6_COLOR.py @@ -104,7 +104,12 @@ def begin(self): self.EPAPER_DC_PIN = Pin(EPAPER_DC_PIN, Pin.OUT) self.EPAPER_CS_PIN = Pin(EPAPER_CS_PIN, Pin.OUT) - self.SD_ENABLE = gpioPin(self._PCAL6416A, 10, modeOUTPUT) + self.SD_ENABLE = gpioPin(self._PCAL6416A, 13, modeOUTPUT) + + # Touchpads + self.TOUCH1 = gpioPin(self._PCAL6416A, 10, modeINPUT_PULLUP) + self.TOUCH2 = gpioPin(self._PCAL6416A, 11, modeINPUT_PULLUP) + self.TOUCH3 = gpioPin(self._PCAL6416A, 12, modeINPUT_PULLUP) self.framebuf = bytearray(D_ROWS * D_COLS // 2) @@ -154,8 +159,6 @@ def begin(self): self.sendCommand(b"\x50") self.sendData(b"\x37") - self.setPCALForLowPower() - self._panelState = True return True