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í.

Port_ShiftRegs.h 639B

12345678910111213141516171819202122
  1. #ifndef PORT_SHIFTREGS_H
  2. #define PORT_SHIFTREGS_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <SPI.h>
  6. #include "PortWriteInterface.h"
  7. /* Port_ShiftRegs
  8. slaveSelect is Arduino-pin number connected to shift register RCLK pin a.k.a. SS or ST
  9. */
  10. class Port_ShiftRegs : public PortWriteInterface
  11. {
  12. private:
  13. const uint8_t slaveSelect; //controller-pin number
  14. uint8_t outputVal; //bit pattern for LEDs
  15. public:
  16. Port_ShiftRegs(const uint8_t slaveSelect);
  17. void begin();
  18. void writeLow(const uint8_t pin);
  19. void writeHigh(const uint8_t pin);
  20. };
  21. #endif