keybrd library is an open source library for creating custom-keyboard firmware.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Este repositório está arquivado. Você pode visualizar os arquivos e realizar clone, mas não poderá realizar push nem abrir issues e pull requests.

RowScanner_PinsBitwise.cpp 749B

12345678910111213141516171819202122232425262728293031323334
  1. #include "RowScanner_PinsBitwise.h"
  2. /*
  3. Strobes the row and reads the columns.
  4. Sets rowEnd and returns rowState.
  5. */
  6. ColPort* const RowScanner_PinsBitwise::scan(read_pins_mask_t& rowEnd)
  7. {
  8. //strobe row on
  9. if (activeHigh)
  10. {
  11. refRowPort.setActivePinHigh(strobePin);
  12. }
  13. else //activeLow
  14. {
  15. refRowPort.setActivePinLow(strobePin);
  16. }
  17. delayMicroseconds(3); //time to stablize voltage
  18. //read the port pins
  19. refColPort.read();
  20. //strobe row off
  21. if (activeHigh)
  22. {
  23. refRowPort.setActivePinLow(strobePin);
  24. }
  25. else //activeLow
  26. {
  27. refRowPort.setActivePinHigh(strobePin);
  28. }
  29. // return getRowState(refColPort, rowEnd);
  30. return &refColPort;
  31. }