From 4a91d182776a956c5442debbaf7a8af047d429c0 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 22 Feb 2013 19:37:27 +0900 Subject: Add keymap for PC98 --- converter/pc98_usb/config.h | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'converter/pc98_usb/config.h') diff --git a/converter/pc98_usb/config.h b/converter/pc98_usb/config.h index 6f9f8fc3cf..6ef2c6ac30 100644 --- a/converter/pc98_usb/config.h +++ b/converter/pc98_usb/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . #define CONFIG_H #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3333 +#define PRODUCT_ID 0x9898 #define DEVICE_VER 0x0100 #define MANUFACTURER t.m.k. #define PRODUCT PC98 keyboard converter @@ -38,36 +38,40 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* PC98 control */ + +/* PC98 Serial(USART) configuration + * asynchronous, positive logic, 19200baud, bit order: LSB first + * 1-start bit, 8-data bit, odd parity, 1-stop bit + */ +#define SERIAL_BAUD 19200 +#define SERIAL_PARITY_ODD +#define SERIAL_BIT_ORDER_LSB + +/* PC98 Reset Port */ #define PC98_RST_DDR DDRD #define PC98_RST_PORT PORTD #define PC98_RST_BIT 1 +/* PC98 Ready Port */ #define PC98_RDY_DDR DDRD #define PC98_RDY_PORT PORTD #define PC98_RDY_BIT 4 +/* PC98 Retry Port */ #define PC98_RTY_DDR DDRD #define PC98_RTY_PORT PORTD #define PC98_RTY_BIT 5 -/* Serial(USART) configuration - * asynchronous, negative logic, 19200baud, no flow control - * 1-start bit, 8-data bit, odd parity, 1-stop bit - */ -#define SERIAL_BAUD 19200 -#define SERIAL_PARITY_ODD -#define SERIAL_BIT_ORDER_LSB - +/* RXD Port */ #define SERIAL_RXD_DDR DDRD #define SERIAL_RXD_PORT PORTD #define SERIAL_RXD_PIN PIND #define SERIAL_RXD_BIT 2 +#define SERIAL_RXD_READ() (SERIAL_RXD_PIN&(1<. /* clear interrupt flag */ \ EIFR = (1<