ClosedCube_TCA9548A.h 636 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef CLOSEDCUBE_TCA9548A_H
  2. #define CLOSEDCUBE_TCA9548A_H
  3. #include <Arduino.h>
  4. #define TCA9548A_MAX_CHANNELS 6
  5. namespace ClosedCube
  6. {
  7. namespace Wired
  8. {
  9. class TCA9548A
  10. {
  11. public:
  12. TCA9548A();
  13. TCA9548A(uint8_t address);
  14. void address(uint8_t address);
  15. uint8_t getChannel();
  16. uint8_t selectChannel(uint8_t channel);
  17. uint8_t nextChannel();
  18. private:
  19. uint8_t _address;
  20. uint8_t _currentChannel;
  21. };
  22. }
  23. }
  24. #endif //CLOSEDCUBE_TCA9548A_H