X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=converter%2Fsun_usb%2Fconfig.h;h=414fd56399dc17706cd8f943c3716e405cdf71e3;hb=ad1c5594928ce952f5205b0f9aaf3e8c04771336;hp=b4f0ff977a46db6319f0cfe2f6561c88adbf3a11;hpb=0ffd4ae3a9470e4efe41880db27a6ae77ccf1ce2;p=max%2Ftmk_keyboard.git
diff --git a/converter/sun_usb/config.h b/converter/sun_usb/config.h
index b4f0ff97..414fd563 100644
--- a/converter/sun_usb/config.h
+++ b/converter/sun_usb/config.h
@@ -25,12 +25,10 @@ along with this program. If not, see .
#define PRODUCT Sun keyboard converter
#define DESCRIPTION converts Sun keyboard protocol into USB
-
/* matrix size */
#define MATRIX_ROWS 16
#define MATRIX_COLS 8
-
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \
@@ -38,45 +36,91 @@ along with this program. If not, see .
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
+/* legacy keymap support */
+#define USE_LEGACY_KEYMAP
-/* Serial(USART) configuration
- * asynchronous, negative logic, 1200baud, no flow control
- * 1-start bit, 8-data bit, non parity, 1-stop bit
+/* HARDWARE_SERAIL assumes that a logic inverter (7404) is placed
+ * in front of RX/TX to produce the positive logic the MCU expects.
+ * The default is Software Serial.
*/
-#define SERIAL_BAUD 1200
+#if defined(HARDWARE_SERIAL)
-#define SERIAL_RXD_DDR DDRD
-#define SERIAL_RXD_PORT PORTD
-#define SERIAL_RXD_PIN PIND
-#define SERIAL_RXD_BIT 2
-#define SERIAL_RXD_VECT INT2_vect
-#define SERIAL_RXD_INIT() do { \
- /* pin configuration: input with pull-up */ \
- SERIAL_RXD_DDR &= ~(1<>8); /* baud rate */ \
+ UCSR1B = (1<