keybrd library is an open source library for creating custom-keyboard firmware.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.

Scanner_Port.cpp 566B

123456789101112131415161718192021
  1. #include "Scanner_Port.h"
  2. /* scan() strobes the row's strobePin and retuns state of port's input pins.
  3. Bitwise variables are 1 bit per key.
  4. */
  5. uint8_t Scanner_Port::scan()
  6. {
  7. uint8_t readState; //bitwise, 1 means key is pressed, 0 means released
  8. //strobe on
  9. refPortWrite.write(strobePin, STROBE_ON);
  10. delayMicroseconds(3); //time to stabilize voltage
  11. //read the port pins
  12. readState = refPortRead.read();
  13. //strobe off
  14. refPortWrite.write(strobePin, STROBE_OFF);
  15. return readState;
  16. }