matrix.h 851 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef SPLIT_COMMON_MATRIX_H
  2. #define SPLIT_COMMON_MATRIX_H
  3. #include <common/matrix.h>
  4. #ifdef RGBLIGHT_ENABLE
  5. # include "rgblight.h"
  6. #endif
  7. typedef struct _Serial_m2s_buffer_t {
  8. #ifdef BACKLIGHT_ENABLE
  9. uint8_t backlight_level;
  10. #endif
  11. #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
  12. rgblight_config_t rgblight_config; //not yet use
  13. //
  14. // When MCUs on both sides drive their respective RGB LED chains,
  15. // it is necessary to synchronize, so it is necessary to communicate RGB information.
  16. // In that case, define the RGBLIGHT_SPLIT macro.
  17. //
  18. // Otherwise, if the master side MCU drives both sides RGB LED chains,
  19. // there is no need to communicate.
  20. #endif
  21. } Serial_m2s_buffer_t;
  22. extern volatile Serial_m2s_buffer_t serial_m2s_buffer;
  23. void serial_master_init(void);
  24. void serial_slave_init(void);
  25. #endif