aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/treadstone48/rev1/split_scomm.h
diff options
context:
space:
mode:
authorGravatar marksard <38324387+marksard@users.noreply.github.com>2019-04-04 14:56:22 +0900
committerGravatar Drashna Jaelre <drashna@live.com>2019-04-03 22:56:22 -0700
commitdebd902a3d5788beab8580a26c84d7db2365a638 (patch)
tree5d45358a2655fbbd2d5ecd5941a5fad61de5fd51 /keyboards/treadstone48/rev1/split_scomm.h
parent4f4fad83737546db6dd04af9e26320ef7d0610dd (diff)
downloadqmk_firmware-debd902a3d5788beab8580a26c84d7db2365a638.tar.gz
[Keyboard] add treeadstone48 (#5405)
* Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization
Diffstat (limited to 'keyboards/treadstone48/rev1/split_scomm.h')
-rw-r--r--keyboards/treadstone48/rev1/split_scomm.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/keyboards/treadstone48/rev1/split_scomm.h b/keyboards/treadstone48/rev1/split_scomm.h
new file mode 100644
index 000000000..16887eb74
--- /dev/null
+++ b/keyboards/treadstone48/rev1/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