keybrd library is an open source library for creating custom-keyboard firmware.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

LED_shiftRegs.h 652B

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