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.

Scanner_Port.cpp 469B

123456789101112131415161718192021
  1. #include "Scanner_Port.h"
  2. /*
  3. Strobes the row and reads the columns.
  4. */
  5. uint8_t Scanner_Port::scan()
  6. {
  7. uint8_t readState;
  8. //strobe row on
  9. refPortWrite.write(STROBE_PIN, STROBE_ON);
  10. delayMicroseconds(3); //time to stablize voltage
  11. //read the port pins
  12. readState = refPortRead.read();
  13. //strobe row off
  14. refPortWrite.write(STROBE_PIN, STROBE_OFF);
  15. //return refPortRead.getPortState();
  16. return readState;
  17. }