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.

123456789101112131415161718192021222324
  1. #ifndef ROW_H
  2. #define ROW_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <config_keybrd.h>
  6. #include <Key.h>
  7. /* Row is an abstract base class.
  8. */
  9. class Row
  10. {
  11. private:
  12. Key *const *const ptrsKeys; //array of Key pointers
  13. virtual void keyWasPressed();
  14. protected:
  15. read_pins_t debounced; //bitwise state of keys after debouncing
  16. // 1 means pressed, 0 means released
  17. void send(const uint8_t readPinCount, const read_pins_t debouncedChanged);
  18. public:
  19. Row(Key* const ptrsKeys[]) : ptrsKeys(ptrsKeys), debounced(0) { }
  20. virtual void process()=0;
  21. };
  22. #endif