3 #include <common/matrix.h>
5 #define ROWS_PER_HAND (MATRIX_ROWS/2)
7 typedef struct _Serial_s2m_buffer_t {
8 // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
9 matrix_row_t smatrix[ROWS_PER_HAND];
10 } Serial_s2m_buffer_t;
12 typedef struct _Serial_m2s_buffer_t {
13 #ifdef BACKLIGHT_ENABLE
14 uint8_t backlight_level;
16 #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
17 rgblight_config_t rgblight_config; //not yet use
19 // When MCUs on both sides drive their respective RGB LED chains,
20 // it is necessary to synchronize, so it is necessary to communicate RGB information.
21 // In that case, define the RGBLIGHT_SPLIT macro.
23 // Otherwise, if the master side MCU drives both sides RGB LED chains,
24 // there is no need to communicate.
27 uint8_t current_layer;
32 } Serial_m2s_buffer_t;
34 extern volatile Serial_s2m_buffer_t serial_s2m_buffer;
35 extern volatile Serial_m2s_buffer_t serial_m2s_buffer;
37 void transport_master_init(void);
38 void transport_slave_init(void);
40 // returns false if valid data not received from slave
41 bool transport_master(matrix_row_t matrix[]);
42 void transport_slave(matrix_row_t matrix[]);