X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=keyboards%2Fhhkb%2Fconfig.h;h=af7ecc5e258e885b6d5f71ca89653186ea89cd9a;hb=d29a61e9ce39947cc2618c5d19d36f063bb0255b;hp=3f0528b4b976c38f0fd0f7169847e7713c2b15ae;hpb=8655d4f4948b2deef7844503c8d690f23ac1a062;p=qmk_firmware.git
diff --git a/keyboards/hhkb/config.h b/keyboards/hhkb/config.h
index 3f0528b4b..af7ecc5e2 100644
--- a/keyboards/hhkb/config.h
+++ b/keyboards/hhkb/config.h
@@ -54,6 +54,47 @@ along with this program. If not, see .
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
+#ifdef HHKB_RN42_ENABLE
+// rn42 support -- acquired from the tmk repo. This is almost certainly not
+// integrated with qmk in the correct way.
+
+#define SUART_OUT_PORT PORTD
+#define SUART_OUT_BIT 0
+#define SUART_IN_PIN PIND
+#define SUART_IN_BIT 1
+
+#ifdef __AVR_ATmega32U4__
+ /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */
+ #define UCSR1D _SFR_MEM8(0xCB)
+ #define RTSEN 0
+ #define CTSEN 1
+
+ #define SERIAL_UART_BAUD 115200
+ #define SERIAL_UART_DATA UDR1
+ #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5))
+ #define SERIAL_UART_RXD_VECT USART1_RX_vect
+ #define SERIAL_UART_TXD_READY (UCSR1A&(1<>8); /* baud rate */ \
+ UCSR1B |= (1<