Skip to content

Commit

Permalink
Migrate platform independent code from tmk_core -> quantum (qmk#13673)
Browse files Browse the repository at this point in the history
* Migrate action|keyboard|keycode|eeconfig from tmk_core -> quantum
  • Loading branch information
zvecr authored Aug 17, 2021
1 parent 96e2b13 commit b8e913c
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 9 deletions.
7 changes: 7 additions & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/send_string.c \
$(QUANTUM_DIR)/bitwise.c \
$(QUANTUM_DIR)/led.c \
$(QUANTUM_DIR)/action.c \
$(QUANTUM_DIR)/action_layer.c \
$(QUANTUM_DIR)/action_macro.c \
$(QUANTUM_DIR)/action_tapping.c \
$(QUANTUM_DIR)/action_util.c \
$(QUANTUM_DIR)/eeconfig.c \
$(QUANTUM_DIR)/keyboard.c \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c \
$(QUANTUM_DIR)/logging/debug.c \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions tmk_core/common/keyboard.c → quantum/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ void keyboard_setup(void) {
keyboard_pre_init_kb();
}

#ifndef SPLIT_KEYBOARD

/** \brief is_keyboard_master
*
* FIXME: needs doc
Expand All @@ -268,6 +270,8 @@ __attribute__((weak)) bool is_keyboard_master(void) { return true; }
*/
__attribute__((weak)) bool is_keyboard_left(void) { return true; }

#endif

/** \brief should_process_keypress
*
* Override this function if you have a condition where keypresses processing should change:
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion quantum/via.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#pragma once

#include "tmk_core/common/eeconfig.h" // for EECONFIG_SIZE
#include "eeconfig.h" // for EECONFIG_SIZE

// Keyboard level code can change where VIA stores the magic.
// The magic is the build date YYMMDD encoded as BCD in 3 bytes,
Expand Down
10 changes: 2 additions & 8 deletions tmk_core/common.mk
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
COMMON_DIR = common
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)

TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
$(COMMON_DIR)/keyboard.c \
$(COMMON_DIR)/action.c \
$(COMMON_DIR)/action_tapping.c \
$(COMMON_DIR)/action_macro.c \
$(COMMON_DIR)/action_layer.c \
$(COMMON_DIR)/action_util.c \
$(COMMON_DIR)/eeconfig.c \
TMK_COMMON_SRC += \
$(COMMON_DIR)/host.c \
$(COMMON_DIR)/report.c \
$(COMMON_DIR)/sync_timer.c \
$(COMMON_DIR)/usb_util.c \
Expand Down

0 comments on commit b8e913c

Please sign in to comment.