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.

1234567891011121314151617181920212223242526272829
  1. #ifndef SCANNER_IOE_H
  2. #define SCANNER_IOE_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include "ScannerInterface.h"
  6. #include "PortInterface.h"
  7. /* Scanner_IOE uses bit manipulation to read all pins of one port.
  8. The maximum keys per row is 8, because ports have a maximum of 8 pins each.
  9. begin() should be called once from sketch setup().
  10. keybrd_library_developer_guide.md has instructions for ## Active state and diode orientation
  11. */
  12. class Scanner_IOE : public ScannerInterface
  13. {
  14. private:
  15. const bool activeState; //logic level of strobe on, HIGH or LOW
  16. PortInterface& refPortWrite; //the IC port containing the strobePin
  17. PortInterface& refPortRead; //the IC's read port
  18. public:
  19. Scanner_IOE(const bool activeState, PortInterface &refPortWrite, PortInterface& refPortRead)
  20. : activeState(activeState), refPortWrite(refPortWrite), refPortRead(refPortRead) {}
  21. void init(const uint8_t strobePin);
  22. void begin();
  23. read_pins_t scan(const uint8_t strobePin);
  24. };
  25. #endif