MiLightRadioConfig.h 751 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <Arduino.h>
  2. #ifndef _MILIGHT_RADIO_CONFIG
  3. #define _MILIGHT_RADIO_CONFIG
  4. class MiLightRadioConfig {
  5. public:
  6. MiLightRadioConfig(const uint16_t syncword0,
  7. const uint16_t syncword3,
  8. const uint8_t* channels,
  9. const size_t numChannels)
  10. : syncword0(syncword0),
  11. syncword3(syncword3),
  12. channels(channels),
  13. numChannels(numChannels)
  14. {}
  15. const uint16_t syncword0;
  16. const uint16_t syncword3;
  17. const uint8_t* channels;
  18. const size_t numChannels;
  19. };
  20. const uint8_t RGBW_CHANNELS[] = {9, 40, 71};
  21. static MiLightRadioConfig MilightRgbwConfig(
  22. 0x147A, 0x258B, RGBW_CHANNELS, 3
  23. );
  24. const uint8_t CCT_CHANNELS[] = {4, 39, 74};
  25. static MiLightRadioConfig MilightCctConfig(
  26. 0x050A, 0x55AA, CCT_CHANNELS, 3
  27. );
  28. #endif