Skip to content

Commit

Permalink
Move converter specific tmk_core protocols (#14743)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored Oct 7, 2021
1 parent c39170b commit e0d688d
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 34 deletions.
4 changes: 0 additions & 4 deletions tmk_core/protocol/adb.c → keyboards/converter/adb_usb/adb.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ bool adb_host_psw(void) { return psw_in(); }
uint16_t adb_host_kbd_recv(void) { return adb_host_talk(ADB_ADDR_KEYBOARD, ADB_REG_0); }

#ifdef ADB_MOUSE_ENABLE
__attribute__((weak)) void adb_mouse_init(void) { return; }

__attribute__((weak)) void adb_mouse_task(void) { return; }

uint16_t adb_host_mouse_recv(void) { return adb_host_talk(ADB_ADDR_MOUSE, ADB_REG_0); }
#endif

Expand Down
File renamed without changes.
8 changes: 8 additions & 0 deletions keyboards/converter/adb_usb/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Ported to QMK by Peter Roe <[email protected]>
#include "led.h"
#include "timer.h"

#ifndef ADB_MOUSE_MAXACC
# define ADB_MOUSE_MAXACC 8
#endif

static bool is_iso_layout = false;

// matrix state buffer(1:on, 0:off)
Expand Down Expand Up @@ -84,6 +88,10 @@ void matrix_init(void)

static report_mouse_t mouse_report = {};

void housekeeping_task_kb(void) {
adb_mouse_task();
}

void adb_mouse_task(void)
{
uint16_t codes;
Expand Down
3 changes: 3 additions & 0 deletions keyboards/converter/adb_usb/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ BACKLIGHT_ENABLE = no
CUSTOM_MATRIX = yes

SRC = matrix.c adb.c led.c

# ADB_MOUSE_ENABLE
# OPT_DEFS += -DADB_MOUSE_ENABLE -DMOUSE_ENABLE
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions keyboards/converter/xt_usb/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
XT_ENABLE = yes
CUSTOM_MATRIX = yes

SRC += matrix.c
SRC += matrix.c xt_interrupt.c
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions quantum/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef SERIAL_MOUSE_ENABLE
# include "serial_mouse.h"
#endif
#ifdef ADB_MOUSE_ENABLE
# include "adb.h"
#endif
#ifdef RGBLIGHT_ENABLE
# include "rgblight.h"
#endif
Expand Down Expand Up @@ -322,9 +319,6 @@ void keyboard_init(void) {
#ifdef SERIAL_MOUSE_ENABLE
serial_mouse_init();
#endif
#ifdef ADB_MOUSE_ENABLE
adb_mouse_init();
#endif
#ifdef BACKLIGHT_ENABLE
backlight_init();
#endif
Expand Down Expand Up @@ -504,10 +498,6 @@ void keyboard_task(void) {
serial_mouse_task();
#endif

#ifdef ADB_MOUSE_ENABLE
adb_mouse_task();
#endif

#ifdef POINTING_DEVICE_ENABLE
pointing_device_task();
#endif
Expand Down
1 change: 0 additions & 1 deletion show_options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ OTHER_OPTION_NAMES = \
SWAP_HANDS_ENABLE \
RING_BUFFERED_6KRO_REPORT_ENABLE \
WATCHDOG_ENABLE \
XT_ENABLE \
ERGOINU \
NO_USB_STARTUP_CHECK \
DISABLE_PROMICRO_LEDs \
Expand Down
9 changes: 0 additions & 9 deletions tmk_core/protocol.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ ifeq ($(strip $(SERIAL_MOUSE_USE_UART)), yes)
SRC += $(PROTOCOL_DIR)/serial_uart.c
endif

ifeq ($(strip $(ADB_MOUSE_ENABLE)), yes)
OPT_DEFS += -DADB_MOUSE_ENABLE -DMOUSE_ENABLE
endif

ifeq ($(strip $(XT_ENABLE)), yes)
SRC += $(PROTOCOL_DIR)/xt_interrupt.c
OPT_DEFS += -DXT_ENABLE
endif

ifeq ($(strip $(USB_HID_ENABLE)), yes)
include $(TMK_DIR)/protocol/usb_hid.mk
endif
Expand Down
11 changes: 3 additions & 8 deletions tmk_core/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ These features can be used in your keyboard.
* Media Control Key - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc
* USB NKRO - 248 keys(+ 8 modifiers) simultaneously
* PS/2 mouse support - PS/2 mouse(TrackPoint) as composite device
* Keyboard protocols - PS/2, ADB, M0110, Sun and other old keyboard protocols
* User Function - Customizable function of key with writing code
* Macro - Very primitive at this time
* Keyboard Tricks - Oneshot modifier and modifier with tapping feature
Expand Down Expand Up @@ -84,9 +83,9 @@ Architecture
/ /| Keys/Mouse | Protocol |d| | Action | | | Protocol |
/__________/ |<-----------| LUFA |r| | Layer, Tap | | | Matrix |
|.--------.| | LED | V-USB |i| |-------------| | | PS/2,IBM | __________________
|| || |----------->| UART |v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /|
|| Host || | Console | |e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / /
||________||/.<-----------| |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / /
|| || |----------->| UART |v| | Keymap | | | | Keys / /_/_/_/_/_/_/_/ /|
|| Host || | Console | |e| | Mousekey | | | |<----------/ /_/_/_/_/_/_/_/ / /
||________||/.<-----------| |r| | Report | | | | Control / /_/_/_/_/_/_/_/ / /
`_========_'/| |---------------------------------------------|-------->/___ /_______/ ___/ /
|_o______o_|/ | Sendchar, Print, Debug, Command, ... | |_________________|/
+---------------------------------------------+ Keyboard
Expand Down Expand Up @@ -134,10 +133,6 @@ Files and Directories
* lufa/ - LUFA USB stack
* vusb/ - Objective Development V-USB
* ps2.c - PS/2 protocol
* adb.c - Apple Desktop Bus protocol
* m0110.c - Macintosh 128K/512K/Plus keyboard protocol
* news.c - Sony NEWS keyboard protocol
* x68k.c - Sharp X68000 keyboard protocol
* serial_soft.c - Asynchronous Serial protocol implemented by software


Expand Down

0 comments on commit e0d688d

Please sign in to comment.