diff options
| author | tmk <nobody@nowhere> | 2013-06-22 02:52:14 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-06-22 02:52:14 +0900 |
| commit | 2593ae132812414f02e7cf483bb141cd2c78595c (patch) | |
| tree | b2b158516bbdc71b2e63117be3d65f25776983ae /converter/x68k_usb/config_pjrc.h | |
| parent | bebbe15562b45aeb911952b0765cd9c732d34306 (diff) | |
| parent | ff47a5613875a9cc719ef7f026d99bb637e662f0 (diff) | |
| download | qmk_firmware-2593ae132812414f02e7cf483bb141cd2c78595c.tar.gz qmk_firmware-2593ae132812414f02e7cf483bb141cd2c78595c.zip | |
Merge branch 'x68k_led'
Diffstat (limited to 'converter/x68k_usb/config_pjrc.h')
| -rw-r--r-- | converter/x68k_usb/config_pjrc.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/converter/x68k_usb/config_pjrc.h b/converter/x68k_usb/config_pjrc.h index 2df83a2cb..c49b4a73e 100644 --- a/converter/x68k_usb/config_pjrc.h +++ b/converter/x68k_usb/config_pjrc.h | |||
| @@ -34,30 +34,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 34 | /* key combination for command */ | 34 | /* key combination for command */ |
| 35 | #define IS_COMMAND() ( \ | 35 | #define IS_COMMAND() ( \ |
| 36 | keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ | 36 | keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ |
| 37 | keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \ | 37 | keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ |
| 38 | keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) \ | ||
| 38 | ) | 39 | ) |
| 39 | 40 | ||
| 40 | /* legacy keymap support */ | 41 | /* legacy keymap support */ |
| 41 | #define USE_LEGACY_KEYMAP | 42 | #define USE_LEGACY_KEYMAP |
| 42 | 43 | ||
| 43 | /* mouse keys */ | ||
| 44 | #ifdef MOUSEKEY_ENABLE | ||
| 45 | # define MOUSEKEY_DELAY_TIME 255 | ||
| 46 | #endif | ||
| 47 | |||
| 48 | 44 | ||
| 49 | /* USART configuration | 45 | /* USART configuration |
| 50 | * asynchronous, 2400baud, 8-data bit, non parity, 1-stop bit, no flow control | 46 | * asynchronous, 2400baud, 8-data bit, non parity, 1-stop bit, no flow control |
| 51 | */ | 47 | */ |
| 52 | #ifdef __AVR_ATmega32U4__ | 48 | #ifdef __AVR_ATmega32U4__ |
| 53 | # define KBD_RX_VECT USART1_RX_vect | 49 | #define SERIAL_UART_BAUD 2400 |
| 54 | # define KBD_RX_DATA UDR1 | 50 | #define SERIAL_UART_DATA UDR1 |
| 55 | # define KBD_RX_BAUD 2400 | 51 | #define SERIAL_UART_UBRR ((F_CPU/(16UL*SERIAL_UART_BAUD))-1) |
| 56 | # define KBD_RX_UBBR ((F_CPU/(16UL*KBD_RX_BAUD))-1) | 52 | #define SERIAL_UART_RXD_VECT USART1_RX_vect |
| 57 | # define KBD_RX_INIT() do { \ | 53 | #define SERIAL_UART_TXD_READY (UCSR1A&(1<<UDRE1)) |
| 58 | UBRR1L = (uint8_t) KBD_RX_UBBR; \ | 54 | #define SERIAL_UART_INIT() do { \ |
| 59 | UBRR1H = (uint8_t) (KBD_RX_UBBR>>8); \ | 55 | UBRR1L = (uint8_t) SERIAL_UART_UBRR; /* baud rate */ \ |
| 60 | UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); \ | 56 | UBRR1H = (uint8_t) (SERIAL_UART_UBRR>>8); /* baud rate */ \ |
| 57 | UCSR1B = (1<<RXCIE1) | (1<<RXEN1) | /* RX: interrupt, RX: enable */ \ | ||
| 58 | (1<<TXEN1); /* TX: enable */ \ | ||
| 59 | UCSR1C = (0<<UPM11) | (0<<UPM10) | /* parity: none(00), even(01), odd(11) */ \ | ||
| 60 | (0<<UCSZ12) | (1<<UCSZ11) | (1<<UCSZ10); /* data-8bit(011) */ \ | ||
| 61 | sei(); \ | ||
| 61 | } while(0) | 62 | } while(0) |
| 62 | #else | 63 | #else |
| 63 | # error "USART configuration is needed." | 64 | # error "USART configuration is needed." |
