Browse Source

Relocate protocol files within tmk_core/common/ (#14972)

* Relocate non platform files within tmk_core/common/

* clang
pull/14975/head
Joel Challis 2 years ago
committed by GitHub
parent
commit
dcfffa7b67
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 14 additions and 7 deletions
  1. +1
    -1
      common_features.mk
  2. +3
    -0
      quantum/keyboard.c
  3. +0
    -0
      quantum/raw_hid.h
  4. +0
    -0
      quantum/sync_timer.c
  5. +0
    -0
      quantum/sync_timer.h
  6. +2
    -0
      quantum/virtser.h
  7. +0
    -4
      tmk_core/common.mk
  8. +6
    -0
      tmk_core/protocol.mk
  9. +0
    -0
      tmk_core/protocol/host.c
  10. +0
    -0
      tmk_core/protocol/host.h
  11. +0
    -0
      tmk_core/protocol/host_driver.h
  12. +2
    -2
      tmk_core/protocol/report.c
  13. +0
    -0
      tmk_core/protocol/report.h
  14. +0
    -0
      tmk_core/protocol/usb_device_state.c
  15. +0
    -0
      tmk_core/protocol/usb_device_state.h
  16. +0
    -0
      tmk_core/protocol/usb_util.c
  17. +0
    -0
      tmk_core/protocol/usb_util.h

+ 1
- 1
common_features.mk View File

@ -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 \


+ 3
- 0
quantum/keyboard.c View File

@ -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; }


tmk_core/common/raw_hid.h → quantum/raw_hid.h View File


tmk_core/common/sync_timer.c → quantum/sync_timer.c View File


tmk_core/common/sync_timer.h → quantum/sync_timer.h View File


tmk_core/common/virtser.h → quantum/virtser.h View File

@ -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);

+ 0
- 4
tmk_core/common.mk View File

@ -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 \


+ 6
- 0
tmk_core/protocol.mk View File

@ -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


tmk_core/common/host.c → tmk_core/protocol/host.c View File


tmk_core/common/host.h → tmk_core/protocol/host.h View File


tmk_core/common/host_driver.h → tmk_core/protocol/host_driver.h View File


tmk_core/common/report.c → tmk_core/protocol/report.c View File

@ -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;

tmk_core/common/report.h → tmk_core/protocol/report.h View File


quantum/usb_device_state.c → tmk_core/protocol/usb_device_state.c View File


quantum/usb_device_state.h → tmk_core/protocol/usb_device_state.h View File


tmk_core/common/usb_util.c → tmk_core/protocol/usb_util.c View File


tmk_core/common/usb_util.h → tmk_core/protocol/usb_util.h View File


Loading…
Cancel
Save