ibmpc_usb: Support secondary IF and mouse by default
This commit is contained in:
parent
b72a600d59
commit
4d6e7f35bc
4 changed files with 36 additions and 38 deletions
|
|
@ -8,8 +8,10 @@ TMK_DIR ?= ../../tmk_core
|
||||||
TARGET_DIR ?= .
|
TARGET_DIR ?= .
|
||||||
|
|
||||||
# project specific files
|
# project specific files
|
||||||
SRC ?= protocol/ibmpc.c \
|
#SRC ?= protocol/ibmpc.c \
|
||||||
ibmpc_usb.c
|
# ibmpc_usb.c
|
||||||
|
SRC ?= protocol/ibmpc.cpp \
|
||||||
|
ibmpc_usb.cpp
|
||||||
|
|
||||||
CONFIG_H ?= config.h
|
CONFIG_H ?= config.h
|
||||||
|
|
||||||
|
|
@ -68,19 +70,19 @@ OPT_DEFS += -DSUSPEND_MODE_STANDBY
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1150)
|
||||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE ?= yes # Mouse keys(+2200)
|
||||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+400)
|
||||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
CONSOLE_ENABLE ?= yes # Console for debug(+4150)
|
||||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
COMMAND_ENABLE ?= no # Commands for debug and configuration(+3600)
|
||||||
NKRO_ENABLE ?= yes # USB Nkey Rollover
|
NKRO_ENABLE ?= yes # USB Nkey Rollover(+350)
|
||||||
|
|
||||||
KEYMAP_SECTION_ENABLE ?= yes
|
KEYMAP_SECTION_ENABLE ?= yes
|
||||||
UNIMAP_ENABLE ?= yes
|
UNIMAP_ENABLE ?= yes
|
||||||
|
|
||||||
# IBMPC Options
|
# IBMPC Options
|
||||||
IBMPC_SECONDARY ?= no # enable secondary interface
|
IBMPC_SECONDARY ?= yes # enable secondary interface(+800)
|
||||||
IBMPC_MOUSE_ENABLE ?= no # enable mouse support
|
IBMPC_MOUSE_ENABLE ?= yes # enable mouse support(+2000)
|
||||||
|
|
||||||
|
|
||||||
# Optimize size but this may cause error "relocation truncated to fit"
|
# Optimize size but this may cause error "relocation truncated to fit"
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# With two interfaces on PS/2 connector
|
|
||||||
TARGET ?= ibmpc_usb_x2
|
|
||||||
MCU = atmega32u2
|
|
||||||
SRC ?= protocol/ibmpc.cpp \
|
|
||||||
ibmpc_usb.cpp
|
|
||||||
|
|
||||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
|
||||||
|
|
||||||
IBMPC_SECONDARY ?= yes # enable secondary interface
|
|
||||||
IBMPC_MOUSE_ENABLE ?= yes # enable mouse support
|
|
||||||
|
|
||||||
include Makefile
|
|
||||||
|
|
@ -51,6 +51,8 @@ Firmware
|
||||||
|
|
||||||
|
|
||||||
### Build Options
|
### Build Options
|
||||||
|
Secondary interface and PS/2 mouses can be supported.
|
||||||
|
|
||||||
In Makefiile:
|
In Makefiile:
|
||||||
|
|
||||||
# IBMPC Options
|
# IBMPC Options
|
||||||
|
|
@ -88,21 +90,22 @@ Pull up resistors of 1-4.7K Ohm on both Data and Clock line are recommended, wit
|
||||||
|
|
||||||
- Data PD0
|
- Data PD0
|
||||||
- Clock PD1
|
- Clock PD1
|
||||||
- Reset PB6 or PB7 (For some of XT keyboards. Not needed for AT, PS/2 and Terminal)
|
- Reset PB6 or PB7
|
||||||
|
|
||||||
For optional secondary interface use these pins.
|
For optional secondary interface use these pins. See PS/2 connector pinouts below.
|
||||||
- Data PD2
|
|
||||||
- Clock PD3
|
- Data2 PD2
|
||||||
|
- Clock2 PD3
|
||||||
|
|
||||||
|
|
||||||
### Reset
|
### Reset
|
||||||
Old Type-1 IBM XT keyboard and some of XT clones need Reset pin to starup its controller.
|
Use pin3 of DIN-5(180-degree) connector for Reset.
|
||||||
Connect Reset pin to pin3 of DIN-5(180-degree) connector. This should not harm keyboards which don't require reset,
|
|
||||||
it is safe and recommended to have Reset pin on AT/XT converter.
|
|
||||||
|
|
||||||
Zenith Z-150 XT and Leading Edge DC-2014 are also known to need this.
|
Reset should not harm keyboards even if they don't require it. It is safe and recommended to have Reset pin on AT/XT converter.
|
||||||
|
|
||||||
See this for IBM XT Type-1 vs Type-2: https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#type-1-vs-type-2
|
Old Type-1 IBM XT keyboard and some of XT clones including Zenith Z-150 XT and Leading Edge DC-2014 are known to need Reset pin. AT, PS/2 and Terminal keyboards don't need it.
|
||||||
|
|
||||||
|
See this for details: https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#keyboard-hard-reset
|
||||||
|
|
||||||
|
|
||||||
### Connector pinouts
|
### Connector pinouts
|
||||||
|
|
@ -124,6 +127,15 @@ See this for IBM XT Type-1 vs Type-2: https://github.com/tmk/tmk_keyboard/wiki/I
|
||||||
#### PS/2 - Mini-DIN-6
|
#### PS/2 - Mini-DIN-6
|
||||||
- https://pinouts.ru/InputCables/KeyboardPC6_pinout.shtml
|
- https://pinouts.ru/InputCables/KeyboardPC6_pinout.shtml
|
||||||
|
|
||||||
|
PS/2 female socket from the front:
|
||||||
|
|
||||||
|
,--_--. 1: Data
|
||||||
|
/ o6 5o \ 2: Data2
|
||||||
|
| o4 3o | 3: GND
|
||||||
|
- 2o o1 - 4: VCC
|
||||||
|
`-___-' 5: Clock
|
||||||
|
6: Clock2
|
||||||
|
|
||||||
For secondary interface use pin2 and pin6 for data and clock respectively.
|
For secondary interface use pin2 and pin6 for data and clock respectively.
|
||||||
You can use PS/2 Y-splitter cable to access secondary interface.
|
You can use PS/2 Y-splitter cable to access secondary interface.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
|
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x1bee
|
#define PRODUCT_ID 0x1BEE
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0201
|
||||||
#define MANUFACTURER t.m.k.
|
#define MANUFACTURER TMK
|
||||||
#define PRODUCT IBM PC keyboard converter
|
#define PRODUCT IBM PC keyboard converter
|
||||||
#define DESCRIPTION convert IBM PC keyboard to USB
|
|
||||||
|
|
||||||
|
|
||||||
/* matrix size */
|
/* matrix size */
|
||||||
|
|
@ -42,9 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
// G80-2551 terminal keyboard support
|
// G80-2551 terminal keyboard support
|
||||||
#define G80_2551_SUPPORT
|
#define G80_2551_SUPPORT
|
||||||
|
|
||||||
// PS/2 Mouse support
|
|
||||||
//#define IBMPC_MOUSE_ENABLE
|
|
||||||
|
|
||||||
// Mouse Extended Report
|
// Mouse Extended Report
|
||||||
//#define MOUSE_EXT_REPORT
|
//#define MOUSE_EXT_REPORT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue