config.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef CONFIG_USER_H
  2. #define CONFIG_USER_H
  3. #include "../../config.h"
  4. # define SERIAL_UART_BAUD 19200
  5. # define SERIAL_UART_DATA UDR1
  6. # define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
  7. # define SERIAL_UART_RXD_VECT USART1_RX_vect
  8. # define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
  9. # define SERIAL_UART_INIT() do { \
  10. /* baud rate */ \
  11. UBRR1L = SERIAL_UART_UBRR; \
  12. /* baud rate */ \
  13. UBRR1H = SERIAL_UART_UBRR >> 8; \
  14. /* enable TX */ \
  15. UCSR1B = _BV(TXEN1); \
  16. /* 8-bit data */ \
  17. UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
  18. sei(); \
  19. } while(0)
  20. /*
  21. * MIDI options
  22. */
  23. /* Prevent use of disabled MIDI features in the keymap */
  24. //#define MIDI_ENABLE_STRICT 1
  25. /* enable basic MIDI features:
  26. - MIDI notes can be sent when in Music mode is on
  27. */
  28. #define MIDI_BASIC
  29. /* enable advanced MIDI features:
  30. - MIDI notes can be added to the keymap
  31. - Octave shift and transpose
  32. - Virtual sustain, portamento, and modulation wheel
  33. - etc.
  34. */
  35. //#define MIDI_ADVANCED
  36. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  37. //#define MIDI_TONE_KEYCODE_OCTAVES 2
  38. #endif