From: tmk Date: Sat, 2 Jun 2018 11:37:34 +0000 (+0900) Subject: pc98_usb: Configure for TMK Converter X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=54c9e737d0f5c4b52294f5bd9da0bbebda8d86f6;p=max%2Ftmk_keyboard.git pc98_usb: Configure for TMK Converter --- diff --git a/converter/pc98_usb/Makefile b/converter/pc98_usb/Makefile index ae6511cd..601e30a9 100644 --- a/converter/pc98_usb/Makefile +++ b/converter/pc98_usb/Makefile @@ -19,9 +19,10 @@ CONFIG_H = config.h # MCU name, you MUST set this to match the board you are using # type "make clean" after changing this, so all files will be rebuilt #MCU = at90usb162 # Teensy 1.0 -MCU = atmega32u4 # Teensy 2.0 +#MCU = atmega32u4 # Teensy 2.0 #MCU = at90usb646 # Teensy++ 1.0 #MCU = at90usb1286 # Teensy++ 2.0 +MCU = atmega32u2 # TMK Converter # Processor frequency. @@ -61,6 +62,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration #NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/converter/pc98_usb/config.h b/converter/pc98_usb/config.h index 16a54ca5..6793c794 100644 --- a/converter/pc98_usb/config.h +++ b/converter/pc98_usb/config.h @@ -32,7 +32,8 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - host_get_first_key() == KC_CANCEL \ + keyboard_report->keys[0] == KC_STOP || \ + keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) \ ) @@ -56,7 +57,7 @@ along with this program. If not, see . /* PC98 Retry Port */ #define PC98_RTY_DDR DDRD #define PC98_RTY_PORT PORTD -#define PC98_RTY_BIT 5 +#define PC98_RTY_BIT 1 /* * PC98 Serial(USART) configuration @@ -110,7 +111,7 @@ along with this program. If not, see . /* * Hardware Serial(UART) */ -#ifdef __AVR_ATmega32U4__ +#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega32U2__) #define SERIAL_UART_BAUD 19200 #define SERIAL_UART_DATA UDR1 #define SERIAL_UART_UBRR ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)