]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - converter/pc98_usb/config.h
ibmpc_usb: Add prebuilt firmware files
[max/tmk_keyboard.git] / converter / pc98_usb / config.h
index b8d676e4cfacae5d5435fcedfe93005e94d37b50..b7a00ed7bd51bdc82476dc9b6f68b3b34be69709 100644 (file)
@@ -19,8 +19,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #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 <http://www.gnu.org/licenses/>.
 
 /* 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 <http://www.gnu.org/licenses/>.
 /* 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 <http://www.gnu.org/licenses/>.
 
 /*
  * 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 <http://www.gnu.org/licenses/>.
         UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); /* RX interrupt, RX: enable */ \
         UCSR1B |= (0<<TXCIE1) | (1<<TXEN1); /* TX interrupt, TX: enable */ \
         UCSR1C |= (1<<UPM11) | (1<<UPM10);  /* parity: none(00), even(01), odd(11) */ \
+        DDRD  &= ~(1<<2); PORTD |=  (1<<2); /* Pull-up RXD pin */ \
         sei(); \
     } while(0)
 #else