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

1234567891011121314151617181920212223
  1. #ifndef LED_AVR_H
  2. #define LED_AVR_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <LED.h>
  6. /* A LED_AVR object is an AVR pin that is used to power an LED on and off.
  7. DDRx Data Direction Register is configured as output in RowPort_AVR constructor.
  8. */
  9. class LED_AVR: public LED
  10. {
  11. private:
  12. volatile unsigned char& PORT;
  13. const uint8_t pin; //bitwise pin to LED
  14. public:
  15. LED_AVR(volatile unsigned char& PORTx, const uint8_t pin): PORT(PORTx), pin(pin) {}
  16. virtual void on();
  17. virtual void off();
  18. };
  19. #endif