diff options
Diffstat (limited to 'keyboards/comet46/config.h')
| -rw-r--r-- | keyboards/comet46/config.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/keyboards/comet46/config.h b/keyboards/comet46/config.h index d50224eb6..5ae026f92 100644 --- a/keyboards/comet46/config.h +++ b/keyboards/comet46/config.h | |||
| @@ -66,19 +66,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 66 | 66 | ||
| 67 | //UART settings for communication with the RF microcontroller | 67 | //UART settings for communication with the RF microcontroller |
| 68 | #define SERIAL_UART_BAUD 1000000 | 68 | #define SERIAL_UART_BAUD 1000000 |
| 69 | #define SERIAL_UART_DATA UDR1 | ||
| 70 | #define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) | ||
| 71 | #define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) | ||
| 72 | #define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) | 69 | #define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) |
| 73 | #define SERIAL_UART_INIT() do { \ | 70 | #define SERIAL_UART_INIT_CUSTOM \ |
| 74 | /* baud rate */ \ | 71 | /* enable TX and RX */ \ |
| 75 | UBRR1L = SERIAL_UART_UBRR; \ | 72 | UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ |
| 76 | /* baud rate */ \ | 73 | /* 8-bit data */ \ |
| 77 | UBRR1H = SERIAL_UART_UBRR >> 8; \ | 74 | UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); |
| 78 | /* enable TX and RX */ \ | ||
| 79 | UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ | ||
| 80 | /* 8-bit data */ \ | ||
| 81 | UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ | ||
| 82 | } while(0) | ||
| 83 | 75 | ||
| 84 | #endif | 76 | #endif |
