aboutsummaryrefslogtreecommitdiff
path: root/quantum/config_common.h
diff options
context:
space:
mode:
authorAlex Ong <the.onga@gmail.com>2019-01-26 11:36:28 +1100
committerAlex Ong <the.onga@gmail.com>2019-01-26 11:36:28 +1100
commitd977daa8dc9136746425f9e1414e1f93cb161877 (patch)
tree209ab8082580e5fdf37f1a8b7c1169250b7548c0 /quantum/config_common.h
parent47c91fc7f75ae0a477e55b687aa0fc30da0a283c (diff)
parent0306e487e2cd6a77ad840d0a441b478747b7ccd0 (diff)
downloadqmk_firmware-d977daa8dc9136746425f9e1414e1f93cb161877.tar.gz
qmk_firmware-d977daa8dc9136746425f9e1414e1f93cb161877.zip
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'quantum/config_common.h')
-rw-r--r--quantum/config_common.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/quantum/config_common.h b/quantum/config_common.h
index cbff372ea..0b2e408a4 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -21,6 +21,9 @@
21#define ROW2COL 1 21#define ROW2COL 1
22#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ 22#define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */
23 23
24// useful for direct pin mapping
25#define NO_PIN (~0)
26
24#ifdef __AVR__ 27#ifdef __AVR__
25 #ifndef __ASSEMBLER__ 28 #ifndef __ASSEMBLER__
26 #include <avr/io.h> 29 #include <avr/io.h>
@@ -125,6 +128,45 @@
125 #endif 128 #endif
126 129
127#elif defined(PROTOCOL_CHIBIOS) 130#elif defined(PROTOCOL_CHIBIOS)
131 // Defines mapping for Proton C replacement
132 #ifdef CONVERT_TO_PROTON_C
133 // Left side (front)
134 #define D3 PAL_LINE(GPIOA, 9)
135 #define D2 PAL_LINE(GPIOA, 10)
136 // GND
137 // GND
138 #define D1 PAL_LINE(GPIOB, 7)
139 #define D0 PAL_LINE(GPIOB, 6)
140 #define D4 PAL_LINE(GPIOB, 5)
141 #define C6 PAL_LINE(GPIOB, 4)
142 #define D7 PAL_LINE(GPIOB, 3)
143 #define E6 PAL_LINE(GPIOB, 2)
144 #define B4 PAL_LINE(GPIOB, 1)
145 #define B5 PAL_LINE(GPIOB, 0)
146
147 // Right side (front)
148 // RAW
149 // GND
150 // RESET
151 // VCC
152 #define F4 PAL_LINE(GPIOA, 2)
153 #define F5 PAL_LINE(GPIOA, 1)
154 #define F6 PAL_LINE(GPIOA, 0)
155 #define F7 PAL_LINE(GPIOB, 8)
156 #define B1 PAL_LINE(GPIOB, 13)
157 #define B3 PAL_LINE(GPIOB, 14)
158 #define B2 PAL_LINE(GPIOB, 15)
159 #define B6 PAL_LINE(GPIOB, 9)
160
161 // LEDs (only D5/C13 uses an actual LED)
162 #ifdef CONVERT_TO_PROTON_C_RXLED
163 #define D5 PAL_LINE(GPIOC, 13)
164 #define B0 PAL_LINE(GPIOC, 13)
165 #else
166 #define D5 PAL_LINE(GPIOC, 13)
167 #define B0 PAL_LINE(GPIOC, 14)
168 #endif
169 #else
128 #define A0 PAL_LINE(GPIOA, 0) 170 #define A0 PAL_LINE(GPIOA, 0)
129 #define A1 PAL_LINE(GPIOA, 1) 171 #define A1 PAL_LINE(GPIOA, 1)
130 #define A2 PAL_LINE(GPIOA, 2) 172 #define A2 PAL_LINE(GPIOA, 2)
@@ -221,6 +263,7 @@
221 #define F13 PAL_LINE(GPIOF, 13) 263 #define F13 PAL_LINE(GPIOF, 13)
222 #define F14 PAL_LINE(GPIOF, 14) 264 #define F14 PAL_LINE(GPIOF, 14)
223 #define F15 PAL_LINE(GPIOF, 15) 265 #define F15 PAL_LINE(GPIOF, 15)
266 #endif
224#endif 267#endif
225 268
226/* USART configuration */ 269/* USART configuration */