1 /* Copyright 2015-2017 Jack Humbert
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef CONFIG_DEFINITIONS_H
18 #define CONFIG_DEFINITIONS_H
20 /* diode directions */
23 #define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */
77 /* USART configuration */
78 #ifdef BLUETOOTH_ENABLE
79 # ifdef __AVR_ATmega32U4__
80 # define SERIAL_UART_BAUD 9600
81 # define SERIAL_UART_DATA UDR1
82 # define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
83 # define SERIAL_UART_RXD_VECT USART1_RX_vect
84 # define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
85 # define SERIAL_UART_INIT() do { \
87 UBRR1L = SERIAL_UART_UBRR; \
89 UBRR1H = SERIAL_UART_UBRR >> 8; \
91 UCSR1B = _BV(TXEN1); \
93 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
97 # error "USART configuration is needed."
101 #define API_SYSEX_MAX_SIZE 32
103 #include "song_list.h"