Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocate protocol files within tmk_core/common/ #14972

Merged
merged 2 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \

Expand Down
3 changes: 3 additions & 0 deletions quantum/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions tmk_core/common/virtser.h → quantum/virtser.h
Original file line number Diff line number Diff line change
@@ -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);

Expand Down
4 changes: 0 additions & 4 deletions tmk_core/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 6 additions & 0 deletions tmk_core/protocol.mk
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tmk_core/common/report.c → tmk_core/protocol/report.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.