summaryrefslogtreecommitdiffstats
path: root/keyboards/yosino58/rev1/split_scomm.h
diff options
context:
space:
mode:
authorさくらんぼ <47372812+sakurachari@users.noreply.github.com>2019-04-12 01:07:39 +0900
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-04-11 09:07:39 -0700
commitdc570b0b389d23b8ea8b46311294a7040b5e1e44 (patch)
tree8e47ebf2f6c291e960664e5d20afc308afa92e24 /keyboards/yosino58/rev1/split_scomm.h
parentfa514e63aaed358dbe4d098e7dc31561f148aec0 (diff)
Keyboard: Add yosino58 Keyboard (#5465)
* Keyboard: Add yosino58 Keyboard * Keyboard: Add yosino58 Keyboard
Diffstat (limited to 'keyboards/yosino58/rev1/split_scomm.h')
-rw-r--r--keyboards/yosino58/rev1/split_scomm.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/keyboards/yosino58/rev1/split_scomm.h b/keyboards/yosino58/rev1/split_scomm.h
new file mode 100644
index 0000000000..873d8939d8
--- /dev/null
+++ b/keyboards/yosino58/rev1/split_scomm.h
@@ -0,0 +1,24 @@
+#ifndef SPLIT_COMM_H
+#define SPLIT_COMM_H
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */
+#include "serial.h"
+
+#else
+/* --- USE flexible API (using multi-type transaction function) --- */
+// Buffers for master - slave communication
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
+
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+extern uint8_t slave_buffer_change_count;
+
+void serial_master_init(void);
+void serial_slave_init(void);
+int serial_update_buffers(int master_changed);
+
+#endif
+
+#endif /* SPLIT_COMM_H */