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

LED_ShiftReg.h 626B

12345678910111213141516171819202122
  1. #ifndef LED_SHIFTREG_H
  2. #define LED_SHIFTREG_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <LEDInterface.h>
  6. #include <PortWriteInterface.h>
  7. /* LED_ShiftReg turns LED on and off.
  8. shift register RCLK pin a.k.a. SS or ST
  9. */
  10. class LED_ShiftReg: public LEDInterface
  11. {
  12. private:
  13. PortWriteInterface& refPort;
  14. const uint8_t pin; //bit pattern, 1 is shift-register pin connected to an LED
  15. public:
  16. LED_ShiftReg(PortWriteInterface& refPort, uint8_t pin)
  17. : refPort(refPort), pin(pin) {}
  18. virtual void on();
  19. virtual void off();
  20. };
  21. #endif