keybrd library is an open source library for creating custom-keyboard firmware.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
1234567891011121314151617181920212223242526272829303132 |
- #include "Scanner_Port.h"
- /*
- Strobes the row and reads the columns.
- */
- uint8_t Scanner_Port::scan()
- {
- //strobe row on
- if (STROBE_ON == LOW) //if activeLow
- {
- refStrobePort.setActivePinLow(strobePin);
- }
- else //if activeHigh
- {
- refStrobePort.setActivePinHigh(strobePin);
- }
- delayMicroseconds(3); //time to stablize voltage
-
- //read the port pins
- refReadPort.read();
-
- //strobe row off
- if (STROBE_ON == LOW) //if activeLow
- {
- refStrobePort.setActivePinHigh(strobePin);
- }
- else //if activeHigh
- {
- refStrobePort.setActivePinLow(strobePin);
- }
-
- return refReadPort.getPortState();
- }
|