diff options
| author | Zay950 <Zay950@users.noreply.github.com> | 2017-03-29 12:00:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-29 12:00:38 -0700 |
| commit | 2366ebfbbdeb6ec29cc9a0facda44d666305dd6e (patch) | |
| tree | 883efed0b7260f3143f5a2a879bc3844a8255e0b /quantum/config_common.h | |
| parent | 80c5ada3394c5ad8087df00ef878eb2cbcd87d70 (diff) | |
| parent | 942f2ccee44bdb2e251553e9730cd8d59307d8b2 (diff) | |
| download | qmk_firmware-2366ebfbbdeb6ec29cc9a0facda44d666305dd6e.tar.gz qmk_firmware-2366ebfbbdeb6ec29cc9a0facda44d666305dd6e.zip | |
Merge branch 'master' into to_push
Diffstat (limited to 'quantum/config_common.h')
| -rw-r--r-- | quantum/config_common.h | 169 |
1 files changed, 72 insertions, 97 deletions
diff --git a/quantum/config_common.h b/quantum/config_common.h index 8ed5f4a10..c88e02d91 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h | |||
| @@ -1,59 +1,78 @@ | |||
| 1 | /* Copyright 2015-2017 Jack Humbert | ||
| 2 | * | ||
| 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. | ||
| 7 | * | ||
| 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. | ||
| 12 | * | ||
| 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/>. | ||
| 15 | */ | ||
| 16 | |||
| 1 | #ifndef CONFIG_DEFINITIONS_H | 17 | #ifndef CONFIG_DEFINITIONS_H |
| 2 | #define CONFIG_DEFINITIONS_H | 18 | #define CONFIG_DEFINITIONS_H |
| 3 | 19 | ||
| 4 | /* diode directions */ | 20 | /* diode directions */ |
| 5 | #define COL2ROW 0 | 21 | #define COL2ROW 0 |
| 6 | #define ROW2COL 1 | 22 | #define ROW2COL 1 |
| 7 | /* I/O pins */ | 23 | #define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ |
| 8 | #define B0 0x30 | ||
| 9 | #define B1 0x31 | ||
| 10 | #define B2 0x32 | ||
| 11 | #define B3 0x33 | ||
| 12 | #define B4 0x34 | ||
| 13 | #define B5 0x35 | ||
| 14 | #define B6 0x36 | ||
| 15 | #define B7 0x37 | ||
| 16 | #define C0 0x60 | ||
| 17 | #define C1 0x61 | ||
| 18 | #define C2 0x62 | ||
| 19 | #define C3 0x63 | ||
| 20 | #define C4 0x64 | ||
| 21 | #define C5 0x65 | ||
| 22 | #define C6 0x66 | ||
| 23 | #define C7 0x67 | ||
| 24 | #define D0 0x90 | ||
| 25 | #define D1 0x91 | ||
| 26 | #define D2 0x92 | ||
| 27 | #define D3 0x93 | ||
| 28 | #define D4 0x94 | ||
| 29 | #define D5 0x95 | ||
| 30 | #define D6 0x96 | ||
| 31 | #define D7 0x97 | ||
| 32 | #define E0 0xC0 | ||
| 33 | #define E1 0xC1 | ||
| 34 | #define E2 0xC2 | ||
| 35 | #define E3 0xC3 | ||
| 36 | #define E4 0xC4 | ||
| 37 | #define E5 0xC5 | ||
| 38 | #define E6 0xC6 | ||
| 39 | #define E7 0xC7 | ||
| 40 | #define F0 0xF0 | ||
| 41 | #define F1 0xF1 | ||
| 42 | #define F2 0xF2 | ||
| 43 | #define F3 0xF3 | ||
| 44 | #define F4 0xF4 | ||
| 45 | #define F5 0xF5 | ||
| 46 | #define F6 0xF6 | ||
| 47 | #define F7 0xF7 | ||
| 48 | #define A0 0x00 | ||
| 49 | #define A1 0x01 | ||
| 50 | #define A2 0x02 | ||
| 51 | #define A3 0x03 | ||
| 52 | #define A4 0x04 | ||
| 53 | #define A5 0x05 | ||
| 54 | #define A6 0x06 | ||
| 55 | #define A7 0x07 | ||
| 56 | 24 | ||
| 25 | /* I/O pins */ | ||
| 26 | #ifndef F0 | ||
| 27 | #define B0 0x30 | ||
| 28 | #define B1 0x31 | ||
| 29 | #define B2 0x32 | ||
| 30 | #define B3 0x33 | ||
| 31 | #define B4 0x34 | ||
| 32 | #define B5 0x35 | ||
| 33 | #define B6 0x36 | ||
| 34 | #define B7 0x37 | ||
| 35 | #define C0 0x60 | ||
| 36 | #define C1 0x61 | ||
| 37 | #define C2 0x62 | ||
| 38 | #define C3 0x63 | ||
| 39 | #define C4 0x64 | ||
| 40 | #define C5 0x65 | ||
| 41 | #define C6 0x66 | ||
| 42 | #define C7 0x67 | ||
| 43 | #define D0 0x90 | ||
| 44 | #define D1 0x91 | ||
| 45 | #define D2 0x92 | ||
| 46 | #define D3 0x93 | ||
| 47 | #define D4 0x94 | ||
| 48 | #define D5 0x95 | ||
| 49 | #define D6 0x96 | ||
| 50 | #define D7 0x97 | ||
| 51 | #define E0 0xC0 | ||
| 52 | #define E1 0xC1 | ||
| 53 | #define E2 0xC2 | ||
| 54 | #define E3 0xC3 | ||
| 55 | #define E4 0xC4 | ||
| 56 | #define E5 0xC5 | ||
| 57 | #define E6 0xC6 | ||
| 58 | #define E7 0xC7 | ||
| 59 | #define F0 0xF0 | ||
| 60 | #define F1 0xF1 | ||
| 61 | #define F2 0xF2 | ||
| 62 | #define F3 0xF3 | ||
| 63 | #define F4 0xF4 | ||
| 64 | #define F5 0xF5 | ||
| 65 | #define F6 0xF6 | ||
| 66 | #define F7 0xF7 | ||
| 67 | #define A0 0x00 | ||
| 68 | #define A1 0x01 | ||
| 69 | #define A2 0x02 | ||
| 70 | #define A3 0x03 | ||
| 71 | #define A4 0x04 | ||
| 72 | #define A5 0x05 | ||
| 73 | #define A6 0x06 | ||
| 74 | #define A7 0x07 | ||
| 75 | #endif | ||
| 57 | 76 | ||
| 58 | /* USART configuration */ | 77 | /* USART configuration */ |
| 59 | #ifdef BLUETOOTH_ENABLE | 78 | #ifdef BLUETOOTH_ENABLE |
| @@ -76,53 +95,9 @@ | |||
| 76 | } while(0) | 95 | } while(0) |
| 77 | # else | 96 | # else |
| 78 | # error "USART configuration is needed." | 97 | # error "USART configuration is needed." |
| 98 | # endif | ||
| 79 | #endif | 99 | #endif |
| 80 | 100 | ||
| 81 | // I'm fairly sure these aren't needed, but oh well - Jack | 101 | #define API_SYSEX_MAX_SIZE 32 |
| 82 | |||
| 83 | /* | ||
| 84 | * PS/2 Interrupt configuration | ||
| 85 | */ | ||
| 86 | #ifdef PS2_USE_INT | ||
| 87 | /* uses INT1 for clock line(ATMega32U4) */ | ||
| 88 | #define PS2_CLOCK_PORT PORTD | ||
| 89 | #define PS2_CLOCK_PIN PIND | ||
| 90 | #define PS2_CLOCK_DDR DDRD | ||
| 91 | #define PS2_CLOCK_BIT 1 | ||
| 92 | |||
| 93 | #define PS2_DATA_PORT PORTD | ||
| 94 | #define PS2_DATA_PIN PIND | ||
| 95 | #define PS2_DATA_DDR DDRD | ||
| 96 | #define PS2_DATA_BIT 0 | ||
| 97 | |||
| 98 | #define PS2_INT_INIT() do { \ | ||
| 99 | EICRA |= ((1<<ISC11) | \ | ||
| 100 | (0<<ISC10)); \ | ||
| 101 | } while (0) | ||
| 102 | #define PS2_INT_ON() do { \ | ||
| 103 | EIMSK |= (1<<INT1); \ | ||
| 104 | } while (0) | ||
| 105 | #define PS2_INT_OFF() do { \ | ||
| 106 | EIMSK &= ~(1<<INT1); \ | ||
| 107 | } while (0) | ||
| 108 | #define PS2_INT_VECT INT1_vect | ||
| 109 | #endif | ||
| 110 | |||
| 111 | /* | ||
| 112 | * PS/2 Busywait configuration | ||
| 113 | */ | ||
| 114 | #ifdef PS2_USE_BUSYWAIT | ||
| 115 | #define PS2_CLOCK_PORT PORTD | ||
| 116 | #define PS2_CLOCK_PIN PIND | ||
| 117 | #define PS2_CLOCK_DDR DDRD | ||
| 118 | #define PS2_CLOCK_BIT 1 | ||
| 119 | |||
| 120 | #define PS2_DATA_PORT PORTD | ||
| 121 | #define PS2_DATA_PIN PIND | ||
| 122 | #define PS2_DATA_DDR DDRD | ||
| 123 | #define PS2_DATA_BIT 0 | ||
| 124 | #endif | ||
| 125 | |||
| 126 | #endif | ||
| 127 | 102 | ||
| 128 | #endif | 103 | #endif |
