diff --git a/src/ReadPort_PCA9655E.cpp b/src/ReadPort_PCA9655E.cpp index a4c180c..d83fb82 100644 --- a/src/ReadPort_PCA9655E.cpp +++ b/src/ReadPort_PCA9655E.cpp @@ -27,4 +27,9 @@ void ReadPort_PCA9655E::read() Wire.requestFrom(port.ADDR, 1u); //request one byte from input port portState = Wire.read(); +/*if (portState)//todo +{ + Keyboard.print(" portState="); + Keyboard.print(portState); +}*/ } diff --git a/src/Scanner_Port.cpp b/src/Scanner_Port.cpp index 62e94af..20a3542 100644 --- a/src/Scanner_Port.cpp +++ b/src/Scanner_Port.cpp @@ -2,14 +2,14 @@ /* Strobes the row and reads the columns. */ -ReadPort* const Scanner_Port::scan() +uint8_t Scanner_Port::scan() { //strobe row on - if (STROBE_ON == LOW) + if (STROBE_ON == LOW) //if activeLow { refStrobePort.setActivePinLow(strobePin); } - else //activeLow + else //if activeHigh { refStrobePort.setActivePinHigh(strobePin); } @@ -19,14 +19,14 @@ ReadPort* const Scanner_Port::scan() refReadPort.read(); //strobe row off - if (STROBE_ON == LOW) + if (STROBE_ON == LOW) //if activeLow { refStrobePort.setActivePinHigh(strobePin); } - else //activeLow + else //if activeHigh { refStrobePort.setActivePinLow(strobePin); } - return &refReadPort; + return refReadPort.getPortState(); } diff --git a/src/Scanner_Port.h b/src/Scanner_Port.h index 8703cfc..25049ea 100644 --- a/src/Scanner_Port.h +++ b/src/Scanner_Port.h @@ -18,6 +18,6 @@ class Scanner_Port public: Scanner_Port(StrobePort &refStrobePort, const uint8_t strobePin, ReadPort& refReadPort) : refStrobePort(refStrobePort), strobePin(strobePin), refReadPort(refReadPort) {} - virtual ReadPort* const scan(); + uint8_t scan(); }; #endif