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

Migrate some tmk_core files to quantum #11791

Merged
merged 2 commits into from
Feb 7, 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
6 changes: 6 additions & 0 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions keyboards/ai03/orbit/matrix.h

This file was deleted.

2 changes: 1 addition & 1 deletion keyboards/ai03/orbit/transport.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "common/matrix.h"
#include "matrix.h"

#define ROWS_PER_HAND (MATRIX_ROWS/2)

Expand Down
File renamed without changes.
7 changes: 0 additions & 7 deletions tmk_core/common/util.h → quantum/bitwise.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions tmk_core/ring_buffer.h → quantum/ring_buffer.h
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion quantum/split_common/transport.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "common/matrix.h"
#include "matrix.h"

void transport_master_init(void);
void transport_slave_init(void);
Expand Down
33 changes: 8 additions & 25 deletions keyboards/converter/adb_usb/led.h → quantum/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 0 additions & 6 deletions tmk_core/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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.)
Expand Down
2 changes: 1 addition & 1 deletion tmk_core/protocol/arm_atsam/md_rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down