aboutsummaryrefslogtreecommitdiff
path: root/converter/x68k_usb/config_pjrc.h
diff options
context:
space:
mode:
Diffstat (limited to 'converter/x68k_usb/config_pjrc.h')
-rw-r--r--converter/x68k_usb/config_pjrc.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/converter/x68k_usb/config_pjrc.h b/converter/x68k_usb/config_pjrc.h
index 2df83a2cb..dd277cff1 100644
--- a/converter/x68k_usb/config_pjrc.h
+++ b/converter/x68k_usb/config_pjrc.h
@@ -40,11 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
40/* legacy keymap support */ 40/* legacy keymap support */
41#define USE_LEGACY_KEYMAP 41#define USE_LEGACY_KEYMAP
42 42
43/* mouse keys */
44#ifdef MOUSEKEY_ENABLE
45# define MOUSEKEY_DELAY_TIME 255
46#endif
47
48 43
49/* USART configuration 44/* USART configuration
50 * asynchronous, 2400baud, 8-data bit, non parity, 1-stop bit, no flow control 45 * asynchronous, 2400baud, 8-data bit, non parity, 1-stop bit, no flow control
@@ -57,7 +52,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
57# define KBD_RX_INIT() do { \ 52# define KBD_RX_INIT() do { \
58 UBRR1L = (uint8_t) KBD_RX_UBBR; \ 53 UBRR1L = (uint8_t) KBD_RX_UBBR; \
59 UBRR1H = (uint8_t) (KBD_RX_UBBR>>8); \ 54 UBRR1H = (uint8_t) (KBD_RX_UBBR>>8); \
60 UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); \ 55 UCSR1B |= (1<<RXCIE1) | (1<<RXEN1) | (1<<TXEN1); \
56 } while(0)
57
58
59 #define SERIAL_UART_BAUD 2400
60 #define SERIAL_UART_DATA UDR1
61 #define SERIAL_UART_UBRR ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)
62 #define SERIAL_UART_RXD_VECT USART1_RX_vect
63 #define SERIAL_UART_TXD_READY (UCSR1A&(1<<UDRE1))
64 #define SERIAL_UART_INIT() do { \
65 UBRR1L = (uint8_t) SERIAL_UART_UBRR; /* baud rate */ \
66 UBRR1H = (uint8_t) (SERIAL_UART_UBRR>>8); /* baud rate */ \
67 UCSR1B = (1<<RXCIE1) | (1<<RXEN1) | /* RX: interrupt, RX: enable */ \
68 (1<<TXEN1); /* TX: enable */ \
69 UCSR1C = (1<<UPM11) | (1<<UPM10) | /* parity: none(00), even(01), odd(11) */ \
70 (0<<UCSZ12) | (1<<UCSZ11) | (1<<UCSZ10); /* 8bit-data(011) */ \
71 sei(); \
61 } while(0) 72 } while(0)
62#else 73#else
63# error "USART configuration is needed." 74# error "USART configuration is needed."