keybrd library is an open source library for creating custom-keyboard firmware.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Dieses Repo ist archiviert. Du kannst Dateien sehen und es klonen, kannst aber nicht pushen oder Issues/Pull-Requests öffnen.

PortWrite_PCA9655E.h 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef PORTWRITE_PCA9655E_H
  2. #define PORTWRITE_PCA9655E_H
  3. #include <Arduino.h>
  4. #include <inttypes.h>
  5. #include <Wire.h>
  6. #include <PortWriteInterface.h>
  7. #include "PortIOE.h"
  8. /* One PCA9655E I/O expander port connected to matrix rows.
  9. write() can output logiclevel to strobePin, one LED pin, or multiple pins.
  10. Instantiation
  11. ------------
  12. Example instantiation:
  13. const uint8_t PortIOE::DEVICE_ADDR = 0x20; //PCA9655E address, all 3 ADDR pins are grounded
  14. PortIOE port0(0);
  15. PortWrite_PCA9655E rowPort0(port0);
  16. Diode orientation
  17. ----------------
  18. Diode orientation is explained in keybrd_library_user_guide.md > Diode orientation
  19. PCA9655E data sheet
  20. ----------------
  21. http://www.onsemi.com/pub_link/Collateral/PCA9655E-D.PDF
  22. */
  23. class PortWrite_PCA9655E : public PortWriteInterface
  24. {
  25. private:
  26. PortIOE& port;
  27. public:
  28. PortWrite_PCA9655E(PortIOE& port) : port(port) {}
  29. void begin();
  30. virtual void write(const uint8_t pin, const bool logicLevel);
  31. };
  32. #endif