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_uC.h 818B

1234567891011121314151617181920212223
  1. #ifndef SCANNER_UC_H
  2. #define SCANNER_UC_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include "config_keybrd.h"
  6. #include "ScannerInterface.h"
  7. /* Scanner_uC class uses Arduino pin numbers (not port pin numbers).
  8. Limit number of readPins to size of read_pins_t, which is defined in config_keybrd.h
  9. */
  10. class Scanner_uC : public ScannerInterface
  11. {
  12. private:
  13. const bool activeState; //logic level of strobe on, HIGH or LOW
  14. const uint8_t* const readPins; //array of read pin numbers
  15. const uint8_t readPinCount; //number of readPins
  16. public:
  17. Scanner_uC(const bool activeState, const uint8_t readPins[], const uint8_t readPinCount);
  18. void init(const uint8_t strobePin);
  19. virtual read_pins_t scan(const uint8_t strobePin);
  20. };
  21. #endif