keybrd library is an open source library for creating custom-keyboard firmware.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Это архивный репозиторий. Вы можете его клонировать или просматривать файлы, но не вносить изменения или открывать задачи/запросы на слияние.

RowScanner_BitManipulation.h 1.0KB

123456789101112131415161718192021222324252627
  1. #ifndef ROWSCANNER_BITMANIPULATION_H
  2. #define ROWSCANNER_BITMANIPULATION_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <RowScannerInterface.h>
  6. #include <RowPort.h>
  7. #include <ColPort.h>
  8. class RowScanner_BitManipulation : public RowScannerInterface
  9. {
  10. private:
  11. static const bool activeHigh; //logic level of strobe pin: 0=activeLow, 1=activeHigh
  12. RowPort &refRowPort; //this row's IC port
  13. const uint8_t rowPin; //bitwise, 1 indicates IC pin connected to this row
  14. ColPort *const *const ptrsColPorts; //array of column ports
  15. const uint8_t colPortCount;
  16. public:
  17. RowScanner_BitManipulation(RowPort &refRowPort, const uint8_t rowPin,
  18. ColPort *const ptrsColPorts[], const uint8_t colPortCount)
  19. : refRowPort(refRowPort), rowPin(rowPin),
  20. ptrsColPorts(ptrsColPorts), colPortCount(colPortCount) {}
  21. virtual uint8_t scan(uint16_t& rowEnd);
  22. uint8_t getRowState(uint16_t& rowEnd);
  23. };
  24. #endif