diff options
Diffstat (limited to 'keyboards/helix/rev2/split_scomm.h')
-rw-r--r-- | keyboards/helix/rev2/split_scomm.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/keyboards/helix/rev2/split_scomm.h b/keyboards/helix/rev2/split_scomm.h new file mode 100644 index 000000000..873d8939d --- /dev/null +++ b/keyboards/helix/rev2/split_scomm.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef SPLIT_COMM_H | ||
2 | #define SPLIT_COMM_H | ||
3 | |||
4 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
5 | /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ | ||
6 | #include "serial.h" | ||
7 | |||
8 | #else | ||
9 | /* --- USE flexible API (using multi-type transaction function) --- */ | ||
10 | // Buffers for master - slave communication | ||
11 | #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
12 | #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 | ||
13 | |||
14 | extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; | ||
15 | extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; | ||
16 | extern uint8_t slave_buffer_change_count; | ||
17 | |||
18 | void serial_master_init(void); | ||
19 | void serial_slave_init(void); | ||
20 | int serial_update_buffers(int master_changed); | ||
21 | |||
22 | #endif | ||
23 | |||
24 | #endif /* SPLIT_COMM_H */ | ||