keybrd library is an open source library for creating custom-keyboard firmware.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、課題・プルリクエストのオープンはできません。

LED_PCA9655E.h 835B

1234567891011121314151617181920212223242526
  1. #ifndef LED_PCA9655E_H
  2. #define LED_PCA9655E_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <Wire.h>
  6. #include <LED.h>
  7. #include "IOExpanderPort.h"
  8. /* A LED_PCA9655E object is an PCA9655E pin that is connected to an LED indicator light.
  9. Input/Ouput Direction configuration is set to ouput in row_Port_PCA9655E.begin() and col_Port_PCA9655E.begin().
  10. */
  11. class LED_PCA9655E: public LED
  12. {
  13. private:
  14. IOExpanderPort& port;
  15. const uint8_t outputByteCommand; //General Purpose Input/Ouput register address
  16. const uint8_t pin; //bitwise pin to LED
  17. public:
  18. LED_PCA9655E(IOExpanderPort& port, const uint8_t pin)
  19. : port(port), outputByteCommand(port.num + 2), pin(pin) {}
  20. virtual void on();
  21. virtual void off();
  22. };
  23. #endif