changed scanner_Port::scan() to return refReadPort.getPortState()
This commit is contained in:
parent
cd22ac0fe7
commit
37186b7586
@ -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);
|
||||
}*/
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user