X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=converter%2Fpc98_usb%2Fconfig.h;h=b7a00ed7bd51bdc82476dc9b6f68b3b34be69709;hb=f016476d83b86737fa9bffd26c08f7ede4bf0805;hp=b8d676e4cfacae5d5435fcedfe93005e94d37b50;hpb=f1f2066657f4a0998adc016c95d7e541b436e09f;p=max%2Ftmk_keyboard.git diff --git a/converter/pc98_usb/config.h b/converter/pc98_usb/config.h index b8d676e4..b7a00ed7 100644 --- a/converter/pc98_usb/config.h +++ b/converter/pc98_usb/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #define CONFIG_H #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x9898 -#define DEVICE_VER 0x0100 +#define PRODUCT_ID 0x9801 +#define DEVICE_VER 0x0101 #define MANUFACTURER t.m.k. #define PRODUCT PC98 keyboard converter #define DESCRIPTION converts PC98 keyboard protocol into USB @@ -32,10 +32,20 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - host_get_first_key() == KC_CANCEL \ + matrix_is_on(12, 0) || /* STOP */ \ + keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) \ ) +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Control LED indicatiors, which doesn't work well with locking support */ +#define PC98_LED_CONTROL + + /* PC98 Reset Port shared with TXD */ #define PC98_RST_DDR DDRD #define PC98_RST_PORT PORTD @@ -47,15 +57,17 @@ 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 * asynchronous, positive logic, 19200baud, bit order: LSB first * 1-start bit, 8-data bit, odd parity, 1-stop bit */ + /* * Software Serial + * Add protocol/serial_soft.c to SRC in Makefile */ #define SERIAL_SOFT_BAUD 19200 #define SERIAL_SOFT_PARITY_ODD @@ -100,8 +112,9 @@ along with this program. If not, see . /* * Hardware Serial(UART) + * Add protocol/serial_uart.c to SRC in Makefile */ -#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) @@ -113,6 +126,7 @@ along with this program. If not, see . UCSR1B |= (1<