summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common_features.mk2
-rw-r--r--quantum/keyboard.c3
-rw-r--r--quantum/raw_hid.h (renamed from tmk_core/common/raw_hid.h)0
-rw-r--r--quantum/sync_timer.c (renamed from tmk_core/common/sync_timer.c)0
-rw-r--r--quantum/sync_timer.h (renamed from tmk_core/common/sync_timer.h)0
-rw-r--r--quantum/virtser.h (renamed from tmk_core/common/virtser.h)2
-rw-r--r--tmk_core/common.mk4
-rw-r--r--tmk_core/protocol.mk6
-rw-r--r--tmk_core/protocol/host.c (renamed from tmk_core/common/host.c)0
-rw-r--r--tmk_core/protocol/host.h (renamed from tmk_core/common/host.h)0
-rw-r--r--tmk_core/protocol/host_driver.h (renamed from tmk_core/common/host_driver.h)0
-rw-r--r--tmk_core/protocol/report.c (renamed from tmk_core/common/report.c)4
-rw-r--r--tmk_core/protocol/report.h (renamed from tmk_core/common/report.h)0
-rw-r--r--tmk_core/protocol/usb_device_state.c (renamed from quantum/usb_device_state.c)0
-rw-r--r--tmk_core/protocol/usb_device_state.h (renamed from quantum/usb_device_state.h)0
-rw-r--r--tmk_core/protocol/usb_util.c (renamed from tmk_core/common/usb_util.c)0
-rw-r--r--tmk_core/protocol/usb_util.h (renamed from tmk_core/common/usb_util.h)0
17 files changed, 14 insertions, 7 deletions
diff --git a/common_features.mk b/common_features.mk
index af538b696f..1d7e955cdf 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -27,7 +27,7 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/keyboard.c \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c \
- $(QUANTUM_DIR)/usb_device_state.c \
+ $(QUANTUM_DIR)/sync_timer.c \
$(QUANTUM_DIR)/logging/debug.c \
$(QUANTUM_DIR)/logging/sendchar.c \
diff --git a/quantum/keyboard.c b/quantum/keyboard.c
index 030fec2d3e..806e4ef7e8 100644
--- a/quantum/keyboard.c
+++ b/quantum/keyboard.c
@@ -94,6 +94,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef DIGITIZER_ENABLE
# include "digitizer.h"
#endif
+#ifdef VIRTSER_ENABLE
+# include "virtser.h"
+#endif
static uint32_t last_input_modification_time = 0;
uint32_t last_input_activity_time(void) { return last_input_modification_time; }
diff --git a/tmk_core/common/raw_hid.h b/quantum/raw_hid.h
index 6d60ab2bff..6d60ab2bff 100644
--- a/tmk_core/common/raw_hid.h
+++ b/quantum/raw_hid.h
diff --git a/tmk_core/common/sync_timer.c b/quantum/sync_timer.c
index de24b463b6..de24b463b6 100644
--- a/tmk_core/common/sync_timer.c
+++ b/quantum/sync_timer.c
diff --git a/tmk_core/common/sync_timer.h b/quantum/sync_timer.h
index 9ddef45bb2..9ddef45bb2 100644
--- a/tmk_core/common/sync_timer.h
+++ b/quantum/sync_timer.h
diff --git a/tmk_core/common/virtser.h b/quantum/virtser.h
index a0645f9e03..df7e87984c 100644
--- a/tmk_core/common/virtser.h
+++ b/quantum/virtser.h
@@ -1,5 +1,7 @@
#pragma once
+void virtser_init(void);
+
/* Define this function in your code to process incoming bytes */
void virtser_recv(const uint8_t ch);
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index ce335f0d3c..8fa1a31e80 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -2,10 +2,6 @@ COMMON_DIR = common
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
TMK_COMMON_SRC += \
- $(COMMON_DIR)/host.c \
- $(COMMON_DIR)/report.c \
- $(COMMON_DIR)/sync_timer.c \
- $(COMMON_DIR)/usb_util.c \
$(PLATFORM_COMMON_DIR)/platform.c \
$(PLATFORM_COMMON_DIR)/suspend.c \
$(PLATFORM_COMMON_DIR)/timer.c \
diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk
index d4ad50db6a..359ddbfef1 100644
--- a/tmk_core/protocol.mk
+++ b/tmk_core/protocol.mk
@@ -1,5 +1,11 @@
PROTOCOL_DIR = protocol
+TMK_COMMON_SRC += \
+ $(PROTOCOL_DIR)/host.c \
+ $(PROTOCOL_DIR)/report.c \
+ $(PROTOCOL_DIR)/usb_device_state.c \
+ $(PROTOCOL_DIR)/usb_util.c \
+
ifeq ($(strip $(USB_HID_ENABLE)), yes)
include $(TMK_DIR)/protocol/usb_hid.mk
endif
diff --git a/tmk_core/common/host.c b/tmk_core/protocol/host.c
index 56d4bb0847..56d4bb0847 100644
--- a/tmk_core/common/host.c
+++ b/tmk_core/protocol/host.c
diff --git a/tmk_core/common/host.h b/tmk_core/protocol/host.h
index 6b15f0d0c1..6b15f0d0c1 100644
--- a/tmk_core/common/host.h
+++ b/tmk_core/protocol/host.h
diff --git a/tmk_core/common/host_driver.h b/tmk_core/protocol/host_driver.h
index affd0dcb34..affd0dcb34 100644
--- a/tmk_core/common/host_driver.h
+++ b/tmk_core/protocol/host_driver.h
diff --git a/tmk_core/common/report.c b/tmk_core/protocol/report.c
index 2a7fc006c4..854b59ae48 100644
--- a/tmk_core/common/report.c
+++ b/tmk_core/protocol/report.c
@@ -24,8 +24,8 @@
#ifdef RING_BUFFERED_6KRO_REPORT_ENABLE
# define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS)
# define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS)
-# define RO_INC(a) RO_ADD(a, 1)
-# define RO_DEC(a) RO_SUB(a, 1)
+# define RO_INC(a) RO_ADD(a, 1)
+# define RO_DEC(a) RO_SUB(a, 1)
static int8_t cb_head = 0;
static int8_t cb_tail = 0;
static int8_t cb_count = 0;
diff --git a/tmk_core/common/report.h b/tmk_core/protocol/report.h
index 1adc892f3b..1adc892f3b 100644
--- a/tmk_core/common/report.h
+++ b/tmk_core/protocol/report.h
diff --git a/quantum/usb_device_state.c b/tmk_core/protocol/usb_device_state.c
index 5ccd309ec2..5ccd309ec2 100644
--- a/quantum/usb_device_state.c
+++ b/tmk_core/protocol/usb_device_state.c
diff --git a/quantum/usb_device_state.h b/tmk_core/protocol/usb_device_state.h
index c229311d46..c229311d46 100644
--- a/quantum/usb_device_state.h
+++ b/tmk_core/protocol/usb_device_state.h
diff --git a/tmk_core/common/usb_util.c b/tmk_core/protocol/usb_util.c
index dd1deeaa11..dd1deeaa11 100644
--- a/tmk_core/common/usb_util.c
+++ b/tmk_core/protocol/usb_util.c
diff --git a/tmk_core/common/usb_util.h b/tmk_core/protocol/usb_util.h
index 13db9fbfbd..13db9fbfbd 100644
--- a/tmk_core/common/usb_util.h
+++ b/tmk_core/protocol/usb_util.h