aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-28 22:31:59 +0100
committerGitHub <noreply@github.com>2021-10-28 22:31:59 +0100
commitdcfffa7b67a072f7d9e37bd8c0029c53b61aeb0f (patch)
tree65491c3878ee76f50c4b46a318503cc27fdb4a6b
parent0c87e2e7025140ca6105b7fec2639c78c3cd8109 (diff)
downloadqmk_firmware-dcfffa7b67a072f7d9e37bd8c0029c53b61aeb0f.tar.gz
qmk_firmware-dcfffa7b67a072f7d9e37bd8c0029c53b61aeb0f.zip
Relocate protocol files within tmk_core/common/ (#14972)
* Relocate non platform files within tmk_core/common/ * clang
-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 af538b696..1d7e955cd 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -27,7 +27,7 @@ QUANTUM_SRC += \
27 $(QUANTUM_DIR)/keyboard.c \ 27 $(QUANTUM_DIR)/keyboard.c \
28 $(QUANTUM_DIR)/keymap_common.c \ 28 $(QUANTUM_DIR)/keymap_common.c \
29 $(QUANTUM_DIR)/keycode_config.c \ 29 $(QUANTUM_DIR)/keycode_config.c \
30 $(QUANTUM_DIR)/usb_device_state.c \ 30 $(QUANTUM_DIR)/sync_timer.c \
31 $(QUANTUM_DIR)/logging/debug.c \ 31 $(QUANTUM_DIR)/logging/debug.c \
32 $(QUANTUM_DIR)/logging/sendchar.c \ 32 $(QUANTUM_DIR)/logging/sendchar.c \
33 33
diff --git a/quantum/keyboard.c b/quantum/keyboard.c
index 030fec2d3..806e4ef7e 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/>.
94#ifdef DIGITIZER_ENABLE 94#ifdef DIGITIZER_ENABLE
95# include "digitizer.h" 95# include "digitizer.h"
96#endif 96#endif
97#ifdef VIRTSER_ENABLE
98# include "virtser.h"
99#endif
97 100
98static uint32_t last_input_modification_time = 0; 101static uint32_t last_input_modification_time = 0;
99uint32_t last_input_activity_time(void) { return last_input_modification_time; } 102uint32_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 6d60ab2bf..6d60ab2bf 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 de24b463b..de24b463b 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 9ddef45bb..9ddef45bb 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 a0645f9e0..df7e87984 100644
--- a/tmk_core/common/virtser.h
+++ b/quantum/virtser.h
@@ -1,5 +1,7 @@
1#pragma once 1#pragma once
2 2
3void virtser_init(void);
4
3/* Define this function in your code to process incoming bytes */ 5/* Define this function in your code to process incoming bytes */
4void virtser_recv(const uint8_t ch); 6void virtser_recv(const uint8_t ch);
5 7
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index ce335f0d3..8fa1a31e8 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -2,10 +2,6 @@ COMMON_DIR = common
2PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY) 2PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
3 3
4TMK_COMMON_SRC += \ 4TMK_COMMON_SRC += \
5 $(COMMON_DIR)/host.c \
6 $(COMMON_DIR)/report.c \
7 $(COMMON_DIR)/sync_timer.c \
8 $(COMMON_DIR)/usb_util.c \
9 $(PLATFORM_COMMON_DIR)/platform.c \ 5 $(PLATFORM_COMMON_DIR)/platform.c \
10 $(PLATFORM_COMMON_DIR)/suspend.c \ 6 $(PLATFORM_COMMON_DIR)/suspend.c \
11 $(PLATFORM_COMMON_DIR)/timer.c \ 7 $(PLATFORM_COMMON_DIR)/timer.c \
diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk
index d4ad50db6..359ddbfef 100644
--- a/tmk_core/protocol.mk
+++ b/tmk_core/protocol.mk
@@ -1,5 +1,11 @@
1PROTOCOL_DIR = protocol 1PROTOCOL_DIR = protocol
2 2
3TMK_COMMON_SRC += \
4 $(PROTOCOL_DIR)/host.c \
5 $(PROTOCOL_DIR)/report.c \
6 $(PROTOCOL_DIR)/usb_device_state.c \
7 $(PROTOCOL_DIR)/usb_util.c \
8
3ifeq ($(strip $(USB_HID_ENABLE)), yes) 9ifeq ($(strip $(USB_HID_ENABLE)), yes)
4 include $(TMK_DIR)/protocol/usb_hid.mk 10 include $(TMK_DIR)/protocol/usb_hid.mk
5endif 11endif
diff --git a/tmk_core/common/host.c b/tmk_core/protocol/host.c
index 56d4bb084..56d4bb084 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 6b15f0d0c..6b15f0d0c 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 affd0dcb3..affd0dcb3 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 2a7fc006c..854b59ae4 100644
--- a/tmk_core/common/report.c
+++ b/tmk_core/protocol/report.c
@@ -24,8 +24,8 @@
24#ifdef RING_BUFFERED_6KRO_REPORT_ENABLE 24#ifdef RING_BUFFERED_6KRO_REPORT_ENABLE
25# define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS) 25# define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS)
26# define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS) 26# define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS)
27# define RO_INC(a) RO_ADD(a, 1) 27# define RO_INC(a) RO_ADD(a, 1)
28# define RO_DEC(a) RO_SUB(a, 1) 28# define RO_DEC(a) RO_SUB(a, 1)
29static int8_t cb_head = 0; 29static int8_t cb_head = 0;
30static int8_t cb_tail = 0; 30static int8_t cb_tail = 0;
31static int8_t cb_count = 0; 31static int8_t cb_count = 0;
diff --git a/tmk_core/common/report.h b/tmk_core/protocol/report.h
index 1adc892f3..1adc892f3 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 5ccd309ec..5ccd309ec 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 c229311d4..c229311d4 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 dd1deeaa1..dd1deeaa1 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 13db9fbfb..13db9fbfb 100644
--- a/tmk_core/common/usb_util.h
+++ b/tmk_core/protocol/usb_util.h