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.

RowScanner_PinsArray.h 1.1KB

12345678910111213141516171819202122232425262728
  1. #ifndef ROWSCANNER_PINSARRAY_H
  2. #define ROWSCANNER_PINSARRAY_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <config_keybrd.h>
  6. #include <RowScannerInterface.h>
  7. #include <RowPort.h>
  8. #include <ColPort.h>
  9. /* RowScanner_PinsArray class uses Arduino pin numbers (not port pin numbers).
  10. The maximum keys per row is 31, because Arduino's largest type is 32 bits and rowEnd consumes the last bit.
  11. Constructor is in RowScanner_PinsArray.cpp
  12. */
  13. class RowScanner_PinsArray : public RowScannerInterface
  14. {
  15. private:
  16. static const bool ACTIVE_HIGH; //logic level of strobe pin: 0=activeLow, 1=activeHigh
  17. const uint8_t STROBE_PIN; //Arduino pin number connected to this row
  18. const uint8_t* const READ_PINS; //array of read pin numbers
  19. const uint8_t READ_PIN_COUNT; //number of read pins
  20. public:
  21. RowScanner_PinsArray(const uint8_t STROBE_PIN,
  22. const uint8_t READ_PINS[], const uint8_t READ_PIN_COUNT);
  23. virtual read_pins_t scan(read_pins_mask_t& rowEnd);
  24. //read_pins_t getRowState(read_pins_mask_t& rowEnd);
  25. };
  26. #endif