diff options
author | Joel Challis <git@zvecr.com> | 2021-02-07 23:16:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-07 23:16:15 +0000 |
commit | 99bffc2a21ebed07fd767ad2a9a7e1aadd491ef3 (patch) | |
tree | 499edfaa4b2a180047f7ca5f6bc882e77f5262fa | |
parent | 7e828795534f7351df54d2c0545b2ed159b1bfde (diff) | |
download | qmk_firmware-99bffc2a21ebed07fd767ad2a9a7e1aadd491ef3.tar.gz qmk_firmware-99bffc2a21ebed07fd767ad2a9a7e1aadd491ef3.zip |
Migrate some tmk_core files to quantum (#11791)
* Migrate some tmk_core files to quantum
* Fix build errors
-rw-r--r-- | common_features.mk | 6 | ||||
-rw-r--r-- | keyboards/ai03/orbit/matrix.h | 3 | ||||
-rw-r--r-- | keyboards/ai03/orbit/transport.h | 2 | ||||
-rw-r--r-- | quantum/bitwise.c (renamed from tmk_core/common/util.c) | 0 | ||||
-rw-r--r-- | quantum/bitwise.h (renamed from tmk_core/common/util.h) | 7 | ||||
-rw-r--r-- | quantum/command.c (renamed from tmk_core/common/command.c) | 0 | ||||
-rw-r--r-- | quantum/command.h (renamed from tmk_core/common/command.h) | 0 | ||||
-rw-r--r-- | quantum/led.h (renamed from tmk_core/common/led.h) | 0 | ||||
-rw-r--r-- | quantum/matrix.h (renamed from tmk_core/common/matrix.h) | 0 | ||||
-rw-r--r-- | quantum/ring_buffer.h (renamed from tmk_core/ring_buffer.h) | 11 | ||||
-rw-r--r-- | quantum/split_common/transport.h | 2 | ||||
-rw-r--r-- | quantum/util.h (renamed from keyboards/converter/adb_usb/led.h) | 33 | ||||
-rw-r--r-- | tmk_core/common.mk | 6 | ||||
-rw-r--r-- | tmk_core/protocol/arm_atsam/md_rgb_matrix.c | 2 |
14 files changed, 22 insertions, 50 deletions
diff --git a/common_features.mk b/common_features.mk index b9cd084d29..f98a788ca2 100644 --- a/common_features.mk +++ b/common_features.mk @@ -17,6 +17,7 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link QUANTUM_SRC += \ $(QUANTUM_DIR)/quantum.c \ + $(QUANTUM_DIR)/bitwise.c \ $(QUANTUM_DIR)/led.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c @@ -36,6 +37,11 @@ ifeq ($(strip $(API_SYSEX_ENABLE)), yes) SRC += $(QUANTUM_DIR)/api.c endif +ifeq ($(strip $(COMMAND_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/command.c + OPT_DEFS += -DCOMMAND_ENABLE +endif + ifeq ($(strip $(AUDIO_ENABLE)), yes) OPT_DEFS += -DAUDIO_ENABLE MUSIC_ENABLE = yes diff --git a/keyboards/ai03/orbit/matrix.h b/keyboards/ai03/orbit/matrix.h deleted file mode 100644 index 664372b769..0000000000 --- a/keyboards/ai03/orbit/matrix.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "common/matrix.h" diff --git a/keyboards/ai03/orbit/transport.h b/keyboards/ai03/orbit/transport.h index 67597652fd..757eae6f5c 100644 --- a/keyboards/ai03/orbit/transport.h +++ b/keyboards/ai03/orbit/transport.h @@ -1,6 +1,6 @@ #pragma once -#include "common/matrix.h" +#include "matrix.h" #define ROWS_PER_HAND (MATRIX_ROWS/2) diff --git a/tmk_core/common/util.c b/quantum/bitwise.c index 861cca0054..861cca0054 100644 --- a/tmk_core/common/util.c +++ b/quantum/bitwise.c diff --git a/tmk_core/common/util.h b/quantum/bitwise.h index db57f268c3..276bc7437b 100644 --- a/tmk_core/common/util.h +++ b/quantum/bitwise.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <stdint.h> -// convert to L string -#define LSTR(s) XLSTR(s) -#define XLSTR(s) L## #s -// convert to string -#define STR(s) XSTR(s) -#define XSTR(s) #s - #ifdef __cplusplus extern "C" { #endif diff --git a/tmk_core/common/command.c b/quantum/command.c index 59aa4e4d34..59aa4e4d34 100644 --- a/tmk_core/common/command.c +++ b/quantum/command.c diff --git a/tmk_core/common/command.h b/quantum/command.h index 4f77be085c..4f77be085c 100644 --- a/tmk_core/common/command.h +++ b/quantum/command.h diff --git a/tmk_core/common/led.h b/quantum/led.h index 0fe38ea035..0fe38ea035 100644 --- a/tmk_core/common/led.h +++ b/quantum/led.h diff --git a/tmk_core/common/matrix.h b/quantum/matrix.h index b570227a31..b570227a31 100644 --- a/tmk_core/common/matrix.h +++ b/quantum/matrix.h diff --git a/tmk_core/ring_buffer.h b/quantum/ring_buffer.h index 8f887c8f74..284745ca8e 100644 --- a/tmk_core/ring_buffer.h +++ b/quantum/ring_buffer.h @@ -1,14 +1,13 @@ #pragma once -/*-------------------------------------------------------------------- - * Ring buffer to store scan codes from keyboard - *------------------------------------------------------------------*/ -#ifndef RBUF_SIZE -# define RBUF_SIZE 32 -#endif #include <util/atomic.h> #include <stdint.h> #include <stdbool.h> + +#ifndef RBUF_SIZE +# define RBUF_SIZE 32 +#endif + static uint8_t rbuf[RBUF_SIZE]; static uint8_t rbuf_head = 0; static uint8_t rbuf_tail = 0; diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h index f3e752bf9b..c667bfab85 100644 --- a/quantum/split_common/transport.h +++ b/quantum/split_common/transport.h @@ -1,6 +1,6 @@ #pragma once -#include "common/matrix.h" +#include "matrix.h" void transport_master_init(void); void transport_slave_init(void); diff --git a/keyboards/converter/adb_usb/led.h b/quantum/util.h index b33b6894e5..bef3b9abe3 100644 --- a/keyboards/converter/adb_usb/led.h +++ b/quantum/util.h @@ -13,31 +13,14 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. - -Ported to QMK by Peter Roe <pete@13bit.me> */ +#pragma once -#ifndef LED_H -#define LED_H -#include <stdint.h> - - -/* keyboard LEDs */ -#define USB_LED_NUM_LOCK 0 -#define USB_LED_CAPS_LOCK 1 -#define USB_LED_SCROLL_LOCK 2 -#define USB_LED_COMPOSE 3 -#define USB_LED_KANA 4 - - -#ifdef __cplusplus -extern "C" { -#endif - -void led_set(uint8_t usb_led); - -#ifdef __cplusplus -} -#endif +#include "bitwise.h" -#endif +// convert to L string +#define LSTR(s) XLSTR(s) +#define XLSTR(s) L## #s +// convert to string +#define STR(s) XSTR(s) +#define XSTR(s) #s diff --git a/tmk_core/common.mk b/tmk_core/common.mk index fdf2aa0972..55af71ed6f 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -13,7 +13,6 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \ $(COMMON_DIR)/print.c \ $(COMMON_DIR)/debug.c \ $(COMMON_DIR)/sendchar_null.c \ - $(COMMON_DIR)/util.c \ $(COMMON_DIR)/eeconfig.c \ $(COMMON_DIR)/report.c \ $(PLATFORM_COMMON_DIR)/suspend.c \ @@ -93,11 +92,6 @@ else TMK_COMMON_DEFS += -DNO_DEBUG endif -ifeq ($(strip $(COMMAND_ENABLE)), yes) - TMK_COMMON_SRC += $(COMMON_DIR)/command.c - TMK_COMMON_DEFS += -DCOMMAND_ENABLE -endif - ifeq ($(strip $(NKRO_ENABLE)), yes) ifeq ($(PROTOCOL), VUSB) $(info NKRO is not currently supported on V-USB, and has been disabled.) diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c index 439aaf8b38..0ea7e38395 100644 --- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "arm_atsam_protocol.h" -#include "tmk_core/common/led.h" +#include "led.h" #include "rgb_matrix.h" #include <string.h> #include <math.h> |