summaryrefslogtreecommitdiffstats
path: root/keyboards/helix/rev2/custom/split_scomm.h
diff options
context:
space:
mode:
authorTakeshi ISHII <2170248+mtei@users.noreply.github.com>2022-03-04 05:23:49 +0900
committerGitHub <noreply@github.com>2022-03-03 20:23:49 +0000
commit4a66bdf29443607ae01c1a6c87b657f89d3a1769 (patch)
treee23d707f8ec8cc07eae3d1554fc88cf79648f4d1 /keyboards/helix/rev2/custom/split_scomm.h
parentae2c77c8272a3b90c75dc2750a0f13a9cd629953 (diff)
Fix helix/rev2 not working properly when using split_common. (#16512)
When helix/rev2 was using split_common, it didn't work properly and I couldn't type on the right hand side. The cause is that the following code, added in 0.16.0 to `quantum/keyboard.c`, does not include `quantum/split_common/split_util.h` but instead includes `keyboards/helix/rev2/split_util.h`. Therefore, `split_pre_init()/split_post_init()` in `quantum/split_common/split_util.c` was not called. ```c #ifdef SPLIT_KEYBOARD # include "split_util.h" #endif ```
Diffstat (limited to 'keyboards/helix/rev2/custom/split_scomm.h')
-rw-r--r--keyboards/helix/rev2/custom/split_scomm.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/keyboards/helix/rev2/custom/split_scomm.h b/keyboards/helix/rev2/custom/split_scomm.h
new file mode 100644
index 0000000000..16887eb74f
--- /dev/null
+++ b/keyboards/helix/rev2/custom/split_scomm.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#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