]> git.donarmstrong.com Git - qmk_firmware.git/blob - quantum/config_common.h
Add RGB underglow, move keys to allow Adjust layer to be reached
[qmk_firmware.git] / quantum / config_common.h
1 #ifndef CONFIG_DEFINITIONS_H
2 #define CONFIG_DEFINITIONS_H
3
4 /* diode directions */
5 #define COL2ROW       0
6 #define ROW2COL       1
7 #define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */
8
9 /* I/O pins */
10 #ifndef F0
11     #define B0 0x30
12     #define B1 0x31
13     #define B2 0x32
14     #define B3 0x33
15     #define B4 0x34
16     #define B5 0x35
17     #define B6 0x36
18     #define B7 0x37
19     #define C0 0x60
20     #define C1 0x61
21     #define C2 0x62
22     #define C3 0x63
23     #define C4 0x64
24     #define C5 0x65
25     #define C6 0x66
26     #define C7 0x67
27     #define D0 0x90
28     #define D1 0x91
29     #define D2 0x92
30     #define D3 0x93
31     #define D4 0x94
32     #define D5 0x95
33     #define D6 0x96
34     #define D7 0x97
35     #define E0 0xC0
36     #define E1 0xC1
37     #define E2 0xC2
38     #define E3 0xC3
39     #define E4 0xC4
40     #define E5 0xC5
41     #define E6 0xC6
42     #define E7 0xC7
43     #define F0 0xF0
44     #define F1 0xF1
45     #define F2 0xF2
46     #define F3 0xF3
47     #define F4 0xF4
48     #define F5 0xF5
49     #define F6 0xF6
50     #define F7 0xF7
51     #define A0 0x00
52     #define A1 0x01
53     #define A2 0x02
54     #define A3 0x03
55     #define A4 0x04
56     #define A5 0x05
57     #define A6 0x06
58     #define A7 0x07
59 #endif
60
61 /* USART configuration */
62 #ifdef BLUETOOTH_ENABLE
63 #   ifdef __AVR_ATmega32U4__
64 #      define SERIAL_UART_BAUD 9600
65 #      define SERIAL_UART_DATA UDR1
66 #      define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
67 #      define SERIAL_UART_RXD_VECT USART1_RX_vect
68 #      define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
69 #      define SERIAL_UART_INIT() do { \
70             /* baud rate */ \
71             UBRR1L = SERIAL_UART_UBRR; \
72             /* baud rate */ \
73             UBRR1H = SERIAL_UART_UBRR >> 8; \
74             /* enable TX */ \
75             UCSR1B = _BV(TXEN1); \
76             /* 8-bit data */ \
77             UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
78             sei(); \
79         } while(0)
80 #   else
81 #       error "USART configuration is needed."
82 #   endif
83 #endif
84
85 #define API_SYSEX_MAX_SIZE 32
86
87 #endif