keybrd library is an open source library for creating custom-keyboard firmware.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
Tento repozitář je archivovaný. Můžete prohlížet soubory, klonovat, ale nemůžete nahrávat a vytvářet nové úkoly a požadavky na natažení.

Row.h 640B

1234567891011121314151617181920212223
  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, 1=pressed, 0=released
  16. void send(const uint8_t readPinCount, const read_pins_t debouncedChanged);
  17. public:
  18. Row(Key* const ptrsKeys[]) : ptrsKeys(ptrsKeys), debounced(0) { }
  19. virtual void process()=0;
  20. };
  21. #endif