1 #ifndef CONFIG_DEFINITIONS_H
2 #define CONFIG_DEFINITIONS_H
59 /* USART configuration */
60 #ifdef BLUETOOTH_ENABLE
61 # ifdef __AVR_ATmega32U4__
62 # define SERIAL_UART_BAUD 9600
63 # define SERIAL_UART_DATA UDR1
64 # define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
65 # define SERIAL_UART_RXD_VECT USART1_RX_vect
66 # define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
67 # define SERIAL_UART_INIT() do { \
69 UBRR1L = SERIAL_UART_UBRR; \
71 UBRR1H = SERIAL_UART_UBRR >> 8; \
73 UCSR1B = _BV(TXEN1); \
75 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
79 # error "USART configuration is needed."
83 #define API_SYSEX_MAX_SIZE 32