Browse Source

Move converter specific tmk_core protocols (#14743)

pull/14749/head
Joel Challis 2 years ago
committed by GitHub
parent
commit
e0d688d4c8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 15 additions and 34 deletions
  1. +0
    -4
      keyboards/converter/adb_usb/adb.c
  2. +0
    -0
      keyboards/converter/adb_usb/adb.h
  3. +8
    -0
      keyboards/converter/adb_usb/matrix.c
  4. +3
    -0
      keyboards/converter/adb_usb/rules.mk
  5. +0
    -0
      keyboards/converter/m0110_usb/m0110.c
  6. +0
    -0
      keyboards/converter/m0110_usb/m0110.h
  7. +1
    -2
      keyboards/converter/xt_usb/rules.mk
  8. +0
    -0
      keyboards/converter/xt_usb/xt.h
  9. +0
    -0
      keyboards/converter/xt_usb/xt_interrupt.c
  10. +0
    -10
      quantum/keyboard.c
  11. +0
    -1
      show_options.mk
  12. +0
    -9
      tmk_core/protocol.mk
  13. +3
    -8
      tmk_core/readme.md

tmk_core/protocol/adb.c → keyboards/converter/adb_usb/adb.c View File

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

tmk_core/protocol/adb.h → keyboards/converter/adb_usb/adb.h View File


+ 8
- 0
keyboards/converter/adb_usb/matrix.c View File

@ -31,6 +31,10 @@ Ported to QMK by Peter Roe <pete@13bit.me>
#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)
@ -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;


+ 3
- 0
keyboards/converter/adb_usb/rules.mk View File

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

tmk_core/protocol/m0110.c → keyboards/converter/m0110_usb/m0110.c View File


tmk_core/protocol/m0110.h → keyboards/converter/m0110_usb/m0110.h View File


+ 1
- 2
keyboards/converter/xt_usb/rules.mk View File

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

tmk_core/protocol/xt.h → keyboards/converter/xt_usb/xt.h View File


tmk_core/protocol/xt_interrupt.c → keyboards/converter/xt_usb/xt_interrupt.c View File


+ 0
- 10
quantum/keyboard.c View File

@ -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
@ -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
@ -504,10 +498,6 @@ MATRIX_LOOP_END:
serial_mouse_task();
#endif
#ifdef ADB_MOUSE_ENABLE
adb_mouse_task();
#endif
#ifdef POINTING_DEVICE_ENABLE
pointing_device_task();
#endif


+ 0
- 1
show_options.mk View File

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


+ 0
- 9
tmk_core/protocol.mk View File

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


+ 3
- 8
tmk_core/readme.md View File

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


Loading…
Cancel
Save