aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-11-04 09:35:43 +1100
committerJoel Challis <git@zvecr.com>2019-11-03 22:35:43 +0000
commit363cdb5fc00519a4eb45a4401b93451949c59d6a (patch)
tree8d5c1eb4938d162e3db353775ba42c0c7fe14e8a
parentbe6562a22335b85e9904c0f7cc748943c9e809a7 (diff)
downloadqmk_firmware-363cdb5fc00519a4eb45a4401b93451949c59d6a.tar.gz
qmk_firmware-363cdb5fc00519a4eb45a4401b93451949c59d6a.zip
Remove duplicate pro_micro.h (#7246)
-rw-r--r--keyboards/ai03/orbit/serial.c1
-rw-r--r--keyboards/claw44/serial.c1
-rw-r--r--keyboards/crkbd/serial.c1
-rw-r--r--keyboards/ergoinu/matrix.c6
-rw-r--r--keyboards/fortitude60/serial.c1
-rw-r--r--keyboards/handwired/xealous/matrix.c1
-rw-r--r--keyboards/helix/local_drivers/serial.c1
-rw-r--r--keyboards/helix/pico/matrix.c6
-rwxr-xr-xkeyboards/lily58/serial.c1
-rw-r--r--keyboards/meira/matrix.c2
-rw-r--r--keyboards/meira/promicro/promicro.h2
-rw-r--r--keyboards/minidox/pro_micro.h362
-rw-r--r--keyboards/mint60/matrix.c6
-rw-r--r--keyboards/treadstone48/pro_micro.h362
-rw-r--r--keyboards/treadstone48/serial.c1
-rw-r--r--keyboards/yosino58/pro_micro.h358
-rw-r--r--keyboards/yosino58/serial.c1
-rw-r--r--keyboards/zinc/serial.c1
-rw-r--r--quantum/split_common/serial.c1
19 files changed, 0 insertions, 1115 deletions
diff --git a/keyboards/ai03/orbit/serial.c b/keyboards/ai03/orbit/serial.c
index 1315377a3..636dfa090 100644
--- a/keyboards/ai03/orbit/serial.c
+++ b/keyboards/ai03/orbit/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/keyboards/claw44/serial.c b/keyboards/claw44/serial.c
index 325c29a3f..f6293c3dc 100644
--- a/keyboards/claw44/serial.c
+++ b/keyboards/claw44/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/keyboards/crkbd/serial.c b/keyboards/crkbd/serial.c
index 325c29a3f..f6293c3dc 100644
--- a/keyboards/crkbd/serial.c
+++ b/keyboards/crkbd/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/keyboards/ergoinu/matrix.c b/keyboards/ergoinu/matrix.c
index 92c95e335..00914a257 100644
--- a/keyboards/ergoinu/matrix.c
+++ b/keyboards/ergoinu/matrix.c
@@ -174,18 +174,12 @@ uint8_t matrix_scan(void) {
174 }else{ 174 }else{
175 matrix_slave_scan(); 175 matrix_slave_scan();
176 176
177// if(serial_slave_DATA_CORRUPT()){
178// TXLED0;
179 int offset = (isLeftHand) ? ROWS_PER_HAND : 0; 177 int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
180 178
181 for (int i = 0; i < ROWS_PER_HAND; ++i) { 179 for (int i = 0; i < ROWS_PER_HAND; ++i) {
182 matrix[offset+i] = serial_master_buffer[i]; 180 matrix[offset+i] = serial_master_buffer[i];
183 } 181 }
184 182
185// }else{
186// TXLED1;
187// }
188
189 matrix_scan_quantum(); 183 matrix_scan_quantum();
190 } 184 }
191 return 1; 185 return 1;
diff --git a/keyboards/fortitude60/serial.c b/keyboards/fortitude60/serial.c
index 6006ebf1b..674c42d59 100644
--- a/keyboards/fortitude60/serial.c
+++ b/keyboards/fortitude60/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/keyboards/handwired/xealous/matrix.c b/keyboards/handwired/xealous/matrix.c
index 6d43db4d9..46410b986 100644
--- a/keyboards/handwired/xealous/matrix.c
+++ b/keyboards/handwired/xealous/matrix.c
@@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
27#include "util.h" 27#include "util.h"
28#include "matrix.h" 28#include "matrix.h"
29#include "split_util.h" 29#include "split_util.h"
30#include "pro_micro.h"
31#include "config.h" 30#include "config.h"
32#include "timer.h" 31#include "timer.h"
33 32
diff --git a/keyboards/helix/local_drivers/serial.c b/keyboards/helix/local_drivers/serial.c
index 6006ebf1b..674c42d59 100644
--- a/keyboards/helix/local_drivers/serial.c
+++ b/keyboards/helix/local_drivers/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/keyboards/helix/pico/matrix.c b/keyboards/helix/pico/matrix.c
index aba55da7c..c2940e3b3 100644
--- a/keyboards/helix/pico/matrix.c
+++ b/keyboards/helix/pico/matrix.c
@@ -202,18 +202,12 @@ uint8_t matrix_scan(void)
202 }else{ 202 }else{
203 matrix_slave_scan(); 203 matrix_slave_scan();
204 204
205// if(serial_slave_DATA_CORRUPT()){
206// TXLED0;
207 int offset = (isLeftHand) ? ROWS_PER_HAND : 0; 205 int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
208 206
209 for (int i = 0; i < ROWS_PER_HAND; ++i) { 207 for (int i = 0; i < ROWS_PER_HAND; ++i) {
210 matrix[offset+i] = serial_master_buffer[i]; 208 matrix[offset+i] = serial_master_buffer[i];
211 } 209 }
212 210
213// }else{
214// TXLED1;
215// }
216
217 matrix_scan_quantum(); 211 matrix_scan_quantum();
218 } 212 }
219 return 1; 213 return 1;
diff --git a/keyboards/lily58/serial.c b/keyboards/lily58/serial.c
index 325c29a3f..f6293c3dc 100755
--- a/keyboards/lily58/serial.c
+++ b/keyboards/lily58/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/keyboards/meira/matrix.c b/keyboards/meira/matrix.c
index 030c91332..7de188a68 100644
--- a/keyboards/meira/matrix.c
+++ b/keyboards/meira/matrix.c
@@ -116,8 +116,6 @@ void matrix_init(void)
116 init_rows(); 116 init_rows();
117// init_lcols(); 117// init_lcols();
118 118
119// TX_RX_LED_INIT;
120
121 // initialize matrix state: all keys off 119 // initialize matrix state: all keys off
122 for (uint8_t i=0; i < MATRIX_ROWS; i++) { 120 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
123 matrix[i] = 0; 121 matrix[i] = 0;
diff --git a/keyboards/meira/promicro/promicro.h b/keyboards/meira/promicro/promicro.h
index 8e7525eab..9e6800b49 100644
--- a/keyboards/meira/promicro/promicro.h
+++ b/keyboards/meira/promicro/promicro.h
@@ -5,6 +5,4 @@
5 5
6#include "quantum.h" 6#include "quantum.h"
7 7
8#include "pro_micro.h"
9
10#endif 8#endif
diff --git a/keyboards/minidox/pro_micro.h b/keyboards/minidox/pro_micro.h
deleted file mode 100644
index f9e7ed75d..000000000
--- a/keyboards/minidox/pro_micro.h
+++ /dev/null
@@ -1,362 +0,0 @@
1/*
2 pins_arduino.h - Pin definition functions for Arduino
3 Part of Arduino - http://www.arduino.cc/
4
5 Copyright (c) 2007 David A. Mellis
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General
18 Public License along with this library; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 Boston, MA 02111-1307 USA
21
22 $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
23*/
24
25#ifndef Pins_Arduino_h
26#define Pins_Arduino_h
27
28#include <avr/pgmspace.h>
29
30// Workaround for wrong definitions in "iom32u4.h".
31// This should be fixed in the AVR toolchain.
32#undef UHCON
33#undef UHINT
34#undef UHIEN
35#undef UHADDR
36#undef UHFNUM
37#undef UHFNUML
38#undef UHFNUMH
39#undef UHFLEN
40#undef UPINRQX
41#undef UPINTX
42#undef UPNUM
43#undef UPRST
44#undef UPCONX
45#undef UPCFG0X
46#undef UPCFG1X
47#undef UPSTAX
48#undef UPCFG2X
49#undef UPIENX
50#undef UPDATX
51#undef TCCR2A
52#undef WGM20
53#undef WGM21
54#undef COM2B0
55#undef COM2B1
56#undef COM2A0
57#undef COM2A1
58#undef TCCR2B
59#undef CS20
60#undef CS21
61#undef CS22
62#undef WGM22
63#undef FOC2B
64#undef FOC2A
65#undef TCNT2
66#undef TCNT2_0
67#undef TCNT2_1
68#undef TCNT2_2
69#undef TCNT2_3
70#undef TCNT2_4
71#undef TCNT2_5
72#undef TCNT2_6
73#undef TCNT2_7
74#undef OCR2A
75#undef OCR2_0
76#undef OCR2_1
77#undef OCR2_2
78#undef OCR2_3
79#undef OCR2_4
80#undef OCR2_5
81#undef OCR2_6
82#undef OCR2_7
83#undef OCR2B
84#undef OCR2_0
85#undef OCR2_1
86#undef OCR2_2
87#undef OCR2_3
88#undef OCR2_4
89#undef OCR2_5
90#undef OCR2_6
91#undef OCR2_7
92
93#define NUM_DIGITAL_PINS 30
94#define NUM_ANALOG_INPUTS 12
95
96#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
97#define TXLED0 PORTD |= (1<<5)
98#define TXLED1 PORTD &= ~(1<<5)
99#define RXLED0 PORTB |= (1<<0)
100#define RXLED1 PORTB &= ~(1<<0)
101
102static const uint8_t SDA = 2;
103static const uint8_t SCL = 3;
104#define LED_BUILTIN 13
105
106// Map SPI port to 'new' pins D14..D17
107static const uint8_t SS = 17;
108static const uint8_t MOSI = 16;
109static const uint8_t MISO = 14;
110static const uint8_t SCK = 15;
111
112// Mapping of analog pins as digital I/O
113// A6-A11 share with digital pins
114static const uint8_t ADC0 = 18;
115static const uint8_t ADC1 = 19;
116static const uint8_t ADC2 = 20;
117static const uint8_t ADC3 = 21;
118static const uint8_t ADC4 = 22;
119static const uint8_t ADC5 = 23;
120static const uint8_t ADC6 = 24; // D4
121static const uint8_t ADC7 = 25; // D6
122static const uint8_t ADC8 = 26; // D8
123static const uint8_t ADC9 = 27; // D9
124static const uint8_t ADC10 = 28; // D10
125static const uint8_t ADC11 = 29; // D12
126
127#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
128#define digitalPinToPCICRbit(p) 0
129#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
130#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
131
132// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
133extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
134#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
135
136#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
137
138#ifdef ARDUINO_MAIN
139
140// On the Arduino board, digital pins are also used
141// for the analog output (software PWM). Analog input
142// pins are a separate set.
143
144// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
145//
146// D0 PD2 RXD1/INT2
147// D1 PD3 TXD1/INT3
148// D2 PD1 SDA SDA/INT1
149// D3# PD0 PWM8/SCL OC0B/SCL/INT0
150// D4 A6 PD4 ADC8
151// D5# PC6 ??? OC3A/#OC4A
152// D6# A7 PD7 FastPWM #OC4D/ADC10
153// D7 PE6 INT6/AIN0
154//
155// D8 A8 PB4 ADC11/PCINT4
156// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
157// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
158// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
159// D12 A11 PD6 T1/#OC4D/ADC9
160// D13# PC7 PWM10 CLK0/OC4A
161//
162// A0 D18 PF7 ADC7
163// A1 D19 PF6 ADC6
164// A2 D20 PF5 ADC5
165// A3 D21 PF4 ADC4
166// A4 D22 PF1 ADC1
167// A5 D23 PF0 ADC0
168//
169// New pins D14..D17 to map SPI port to digital pins
170//
171// MISO D14 PB3 MISO,PCINT3
172// SCK D15 PB1 SCK,PCINT1
173// MOSI D16 PB2 MOSI,PCINT2
174// SS D17 PB0 RXLED,SS/PCINT0
175//
176// Connected LEDs on board for TX and RX
177// TXLED D24 PD5 XCK1
178// RXLED D17 PB0
179// HWB PE2 HWB
180
181// these arrays map port names (e.g. port B) to the
182// appropriate addresses for various functions (e.g. reading
183// and writing)
184const uint16_t PROGMEM port_to_mode_PGM[] = {
185 NOT_A_PORT,
186 NOT_A_PORT,
187 (uint16_t) &DDRB,
188 (uint16_t) &DDRC,
189 (uint16_t) &DDRD,
190 (uint16_t) &DDRE,
191 (uint16_t) &DDRF,
192};
193
194const uint16_t PROGMEM port_to_output_PGM[] = {
195 NOT_A_PORT,
196 NOT_A_PORT,
197 (uint16_t) &PORTB,
198 (uint16_t) &PORTC,
199 (uint16_t) &PORTD,
200 (uint16_t) &PORTE,
201 (uint16_t) &PORTF,
202};
203
204const uint16_t PROGMEM port_to_input_PGM[] = {
205 NOT_A_PORT,
206 NOT_A_PORT,
207 (uint16_t) &PINB,
208 (uint16_t) &PINC,
209 (uint16_t) &PIND,
210 (uint16_t) &PINE,
211 (uint16_t) &PINF,
212};
213
214const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
215 PD, // D0 - PD2
216 PD, // D1 - PD3
217 PD, // D2 - PD1
218 PD, // D3 - PD0
219 PD, // D4 - PD4
220 PC, // D5 - PC6
221 PD, // D6 - PD7
222 PE, // D7 - PE6
223
224 PB, // D8 - PB4
225 PB, // D9 - PB5
226 PB, // D10 - PB6
227 PB, // D11 - PB7
228 PD, // D12 - PD6
229 PC, // D13 - PC7
230
231 PB, // D14 - MISO - PB3
232 PB, // D15 - SCK - PB1
233 PB, // D16 - MOSI - PB2
234 PB, // D17 - SS - PB0
235
236 PF, // D18 - A0 - PF7
237 PF, // D19 - A1 - PF6
238 PF, // D20 - A2 - PF5
239 PF, // D21 - A3 - PF4
240 PF, // D22 - A4 - PF1
241 PF, // D23 - A5 - PF0
242
243 PD, // D24 - PD5
244 PD, // D25 / D6 - A7 - PD7
245 PB, // D26 / D8 - A8 - PB4
246 PB, // D27 / D9 - A9 - PB5
247 PB, // D28 / D10 - A10 - PB6
248 PD, // D29 / D12 - A11 - PD6
249};
250
251const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
252 _BV(2), // D0 - PD2
253 _BV(3), // D1 - PD3
254 _BV(1), // D2 - PD1
255 _BV(0), // D3 - PD0
256 _BV(4), // D4 - PD4
257 _BV(6), // D5 - PC6
258 _BV(7), // D6 - PD7
259 _BV(6), // D7 - PE6
260
261 _BV(4), // D8 - PB4
262 _BV(5), // D9 - PB5
263 _BV(6), // D10 - PB6
264 _BV(7), // D11 - PB7
265 _BV(6), // D12 - PD6
266 _BV(7), // D13 - PC7
267
268 _BV(3), // D14 - MISO - PB3
269 _BV(1), // D15 - SCK - PB1
270 _BV(2), // D16 - MOSI - PB2
271 _BV(0), // D17 - SS - PB0
272
273 _BV(7), // D18 - A0 - PF7
274 _BV(6), // D19 - A1 - PF6
275 _BV(5), // D20 - A2 - PF5
276 _BV(4), // D21 - A3 - PF4
277 _BV(1), // D22 - A4 - PF1
278 _BV(0), // D23 - A5 - PF0
279
280 _BV(5), // D24 - PD5
281 _BV(7), // D25 / D6 - A7 - PD7
282 _BV(4), // D26 / D8 - A8 - PB4
283 _BV(5), // D27 / D9 - A9 - PB5
284 _BV(6), // D28 / D10 - A10 - PB6
285 _BV(6), // D29 / D12 - A11 - PD6
286};
287
288const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
289 NOT_ON_TIMER,
290 NOT_ON_TIMER,
291 NOT_ON_TIMER,
292 TIMER0B, /* 3 */
293 NOT_ON_TIMER,
294 TIMER3A, /* 5 */
295 TIMER4D, /* 6 */
296 NOT_ON_TIMER,
297
298 NOT_ON_TIMER,
299 TIMER1A, /* 9 */
300 TIMER1B, /* 10 */
301 TIMER0A, /* 11 */
302
303 NOT_ON_TIMER,
304 TIMER4A, /* 13 */
305
306 NOT_ON_TIMER,
307 NOT_ON_TIMER,
308 NOT_ON_TIMER,
309 NOT_ON_TIMER,
310 NOT_ON_TIMER,
311 NOT_ON_TIMER,
312
313 NOT_ON_TIMER,
314 NOT_ON_TIMER,
315 NOT_ON_TIMER,
316 NOT_ON_TIMER,
317 NOT_ON_TIMER,
318 NOT_ON_TIMER,
319 NOT_ON_TIMER,
320 NOT_ON_TIMER,
321 NOT_ON_TIMER,
322 NOT_ON_TIMER,
323};
324
325const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
326 7, // A0 PF7 ADC7
327 6, // A1 PF6 ADC6
328 5, // A2 PF5 ADC5
329 4, // A3 PF4 ADC4
330 1, // A4 PF1 ADC1
331 0, // A5 PF0 ADC0
332 8, // A6 D4 PD4 ADC8
333 10, // A7 D6 PD7 ADC10
334 11, // A8 D8 PB4 ADC11
335 12, // A9 D9 PB5 ADC12
336 13, // A10 D10 PB6 ADC13
337 9 // A11 D12 PD6 ADC9
338};
339
340#endif /* ARDUINO_MAIN */
341
342// These serial port names are intended to allow libraries and architecture-neutral
343// sketches to automatically default to the correct port name for a particular type
344// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
345// the first hardware serial port whose RX/TX pins are not dedicated to another use.
346//
347// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
348//
349// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
350//
351// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
352//
353// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
354//
355// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
356// pins are NOT connected to anything by default.
357#define SERIAL_PORT_MONITOR Serial
358#define SERIAL_PORT_USBVIRTUAL Serial
359#define SERIAL_PORT_HARDWARE Serial1
360#define SERIAL_PORT_HARDWARE_OPEN Serial1
361
362#endif /* Pins_Arduino_h */
diff --git a/keyboards/mint60/matrix.c b/keyboards/mint60/matrix.c
index 6d8878332..30f3c56bc 100644
--- a/keyboards/mint60/matrix.c
+++ b/keyboards/mint60/matrix.c
@@ -200,18 +200,12 @@ uint8_t matrix_scan(void)
200 }else{ 200 }else{
201 matrix_slave_scan(); 201 matrix_slave_scan();
202 202
203// if(serial_slave_DATA_CORRUPT()){
204// TXLED0;
205 int offset = (isLeftHand) ? ROWS_PER_HAND : 0; 203 int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
206 204
207 for (int i = 0; i < ROWS_PER_HAND; ++i) { 205 for (int i = 0; i < ROWS_PER_HAND; ++i) {
208 matrix[offset+i] = serial_master_buffer[i]; 206 matrix[offset+i] = serial_master_buffer[i];
209 } 207 }
210 208
211// }else{
212// TXLED1;
213// }
214
215 matrix_scan_quantum(); 209 matrix_scan_quantum();
216 } 210 }
217 return 1; 211 return 1;
diff --git a/keyboards/treadstone48/pro_micro.h b/keyboards/treadstone48/pro_micro.h
deleted file mode 100644
index f9e7ed75d..000000000
--- a/keyboards/treadstone48/pro_micro.h
+++ /dev/null
@@ -1,362 +0,0 @@
1/*
2 pins_arduino.h - Pin definition functions for Arduino
3 Part of Arduino - http://www.arduino.cc/
4
5 Copyright (c) 2007 David A. Mellis
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General
18 Public License along with this library; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 Boston, MA 02111-1307 USA
21
22 $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
23*/
24
25#ifndef Pins_Arduino_h
26#define Pins_Arduino_h
27
28#include <avr/pgmspace.h>
29
30// Workaround for wrong definitions in "iom32u4.h".
31// This should be fixed in the AVR toolchain.
32#undef UHCON
33#undef UHINT
34#undef UHIEN
35#undef UHADDR
36#undef UHFNUM
37#undef UHFNUML
38#undef UHFNUMH
39#undef UHFLEN
40#undef UPINRQX
41#undef UPINTX
42#undef UPNUM
43#undef UPRST
44#undef UPCONX
45#undef UPCFG0X
46#undef UPCFG1X
47#undef UPSTAX
48#undef UPCFG2X
49#undef UPIENX
50#undef UPDATX
51#undef TCCR2A
52#undef WGM20
53#undef WGM21
54#undef COM2B0
55#undef COM2B1
56#undef COM2A0
57#undef COM2A1
58#undef TCCR2B
59#undef CS20
60#undef CS21
61#undef CS22
62#undef WGM22
63#undef FOC2B
64#undef FOC2A
65#undef TCNT2
66#undef TCNT2_0
67#undef TCNT2_1
68#undef TCNT2_2
69#undef TCNT2_3
70#undef TCNT2_4
71#undef TCNT2_5
72#undef TCNT2_6
73#undef TCNT2_7
74#undef OCR2A
75#undef OCR2_0
76#undef OCR2_1
77#undef OCR2_2
78#undef OCR2_3
79#undef OCR2_4
80#undef OCR2_5
81#undef OCR2_6
82#undef OCR2_7
83#undef OCR2B
84#undef OCR2_0
85#undef OCR2_1
86#undef OCR2_2
87#undef OCR2_3
88#undef OCR2_4
89#undef OCR2_5
90#undef OCR2_6
91#undef OCR2_7
92
93#define NUM_DIGITAL_PINS 30
94#define NUM_ANALOG_INPUTS 12
95
96#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
97#define TXLED0 PORTD |= (1<<5)
98#define TXLED1 PORTD &= ~(1<<5)
99#define RXLED0 PORTB |= (1<<0)
100#define RXLED1 PORTB &= ~(1<<0)
101
102static const uint8_t SDA = 2;
103static const uint8_t SCL = 3;
104#define LED_BUILTIN 13
105
106// Map SPI port to 'new' pins D14..D17
107static const uint8_t SS = 17;
108static const uint8_t MOSI = 16;
109static const uint8_t MISO = 14;
110static const uint8_t SCK = 15;
111
112// Mapping of analog pins as digital I/O
113// A6-A11 share with digital pins
114static const uint8_t ADC0 = 18;
115static const uint8_t ADC1 = 19;
116static const uint8_t ADC2 = 20;
117static const uint8_t ADC3 = 21;
118static const uint8_t ADC4 = 22;
119static const uint8_t ADC5 = 23;
120static const uint8_t ADC6 = 24; // D4
121static const uint8_t ADC7 = 25; // D6
122static const uint8_t ADC8 = 26; // D8
123static const uint8_t ADC9 = 27; // D9
124static const uint8_t ADC10 = 28; // D10
125static const uint8_t ADC11 = 29; // D12
126
127#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
128#define digitalPinToPCICRbit(p) 0
129#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
130#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
131
132// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
133extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
134#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
135
136#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
137
138#ifdef ARDUINO_MAIN
139
140// On the Arduino board, digital pins are also used
141// for the analog output (software PWM). Analog input
142// pins are a separate set.
143
144// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
145//
146// D0 PD2 RXD1/INT2
147// D1 PD3 TXD1/INT3
148// D2 PD1 SDA SDA/INT1
149// D3# PD0 PWM8/SCL OC0B/SCL/INT0
150// D4 A6 PD4 ADC8
151// D5# PC6 ??? OC3A/#OC4A
152// D6# A7 PD7 FastPWM #OC4D/ADC10
153// D7 PE6 INT6/AIN0
154//
155// D8 A8 PB4 ADC11/PCINT4
156// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
157// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
158// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
159// D12 A11 PD6 T1/#OC4D/ADC9
160// D13# PC7 PWM10 CLK0/OC4A
161//
162// A0 D18 PF7 ADC7
163// A1 D19 PF6 ADC6
164// A2 D20 PF5 ADC5
165// A3 D21 PF4 ADC4
166// A4 D22 PF1 ADC1
167// A5 D23 PF0 ADC0
168//
169// New pins D14..D17 to map SPI port to digital pins
170//
171// MISO D14 PB3 MISO,PCINT3
172// SCK D15 PB1 SCK,PCINT1
173// MOSI D16 PB2 MOSI,PCINT2
174// SS D17 PB0 RXLED,SS/PCINT0
175//
176// Connected LEDs on board for TX and RX
177// TXLED D24 PD5 XCK1
178// RXLED D17 PB0
179// HWB PE2 HWB
180
181// these arrays map port names (e.g. port B) to the
182// appropriate addresses for various functions (e.g. reading
183// and writing)
184const uint16_t PROGMEM port_to_mode_PGM[] = {
185 NOT_A_PORT,
186 NOT_A_PORT,
187 (uint16_t) &DDRB,
188 (uint16_t) &DDRC,
189 (uint16_t) &DDRD,
190 (uint16_t) &DDRE,
191 (uint16_t) &DDRF,
192};
193
194const uint16_t PROGMEM port_to_output_PGM[] = {
195 NOT_A_PORT,
196 NOT_A_PORT,
197 (uint16_t) &PORTB,
198 (uint16_t) &PORTC,
199 (uint16_t) &PORTD,
200 (uint16_t) &PORTE,
201 (uint16_t) &PORTF,
202};
203
204const uint16_t PROGMEM port_to_input_PGM[] = {
205 NOT_A_PORT,
206 NOT_A_PORT,
207 (uint16_t) &PINB,
208 (uint16_t) &PINC,
209 (uint16_t) &PIND,
210 (uint16_t) &PINE,
211 (uint16_t) &PINF,
212};
213
214const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
215 PD, // D0 - PD2
216 PD, // D1 - PD3
217 PD, // D2 - PD1
218 PD, // D3 - PD0
219 PD, // D4 - PD4
220 PC, // D5 - PC6
221 PD, // D6 - PD7
222 PE, // D7 - PE6
223
224 PB, // D8 - PB4
225 PB, // D9 - PB5
226 PB, // D10 - PB6
227 PB, // D11 - PB7
228 PD, // D12 - PD6
229 PC, // D13 - PC7
230
231 PB, // D14 - MISO - PB3
232 PB, // D15 - SCK - PB1
233 PB, // D16 - MOSI - PB2
234 PB, // D17 - SS - PB0
235
236 PF, // D18 - A0 - PF7
237 PF, // D19 - A1 - PF6
238 PF, // D20 - A2 - PF5
239 PF, // D21 - A3 - PF4
240 PF, // D22 - A4 - PF1
241 PF, // D23 - A5 - PF0
242
243 PD, // D24 - PD5
244 PD, // D25 / D6 - A7 - PD7
245 PB, // D26 / D8 - A8 - PB4
246 PB, // D27 / D9 - A9 - PB5
247 PB, // D28 / D10 - A10 - PB6
248 PD, // D29 / D12 - A11 - PD6
249};
250
251const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
252 _BV(2), // D0 - PD2
253 _BV(3), // D1 - PD3
254 _BV(1), // D2 - PD1
255 _BV(0), // D3 - PD0
256 _BV(4), // D4 - PD4
257 _BV(6), // D5 - PC6
258 _BV(7), // D6 - PD7
259 _BV(6), // D7 - PE6
260
261 _BV(4), // D8 - PB4
262 _BV(5), // D9 - PB5
263 _BV(6), // D10 - PB6
264 _BV(7), // D11 - PB7
265 _BV(6), // D12 - PD6
266 _BV(7), // D13 - PC7
267
268 _BV(3), // D14 - MISO - PB3
269 _BV(1), // D15 - SCK - PB1
270 _BV(2), // D16 - MOSI - PB2
271 _BV(0), // D17 - SS - PB0
272
273 _BV(7), // D18 - A0 - PF7
274 _BV(6), // D19 - A1 - PF6
275 _BV(5), // D20 - A2 - PF5
276 _BV(4), // D21 - A3 - PF4
277 _BV(1), // D22 - A4 - PF1
278 _BV(0), // D23 - A5 - PF0
279
280 _BV(5), // D24 - PD5
281 _BV(7), // D25 / D6 - A7 - PD7
282 _BV(4), // D26 / D8 - A8 - PB4
283 _BV(5), // D27 / D9 - A9 - PB5
284 _BV(6), // D28 / D10 - A10 - PB6
285 _BV(6), // D29 / D12 - A11 - PD6
286};
287
288const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
289 NOT_ON_TIMER,
290 NOT_ON_TIMER,
291 NOT_ON_TIMER,
292 TIMER0B, /* 3 */
293 NOT_ON_TIMER,
294 TIMER3A, /* 5 */
295 TIMER4D, /* 6 */
296 NOT_ON_TIMER,
297
298 NOT_ON_TIMER,
299 TIMER1A, /* 9 */
300 TIMER1B, /* 10 */
301 TIMER0A, /* 11 */
302
303 NOT_ON_TIMER,
304 TIMER4A, /* 13 */
305
306 NOT_ON_TIMER,
307 NOT_ON_TIMER,
308 NOT_ON_TIMER,
309 NOT_ON_TIMER,
310 NOT_ON_TIMER,
311 NOT_ON_TIMER,
312
313 NOT_ON_TIMER,
314 NOT_ON_TIMER,
315 NOT_ON_TIMER,
316 NOT_ON_TIMER,
317 NOT_ON_TIMER,
318 NOT_ON_TIMER,
319 NOT_ON_TIMER,
320 NOT_ON_TIMER,
321 NOT_ON_TIMER,
322 NOT_ON_TIMER,
323};
324
325const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
326 7, // A0 PF7 ADC7
327 6, // A1 PF6 ADC6
328 5, // A2 PF5 ADC5
329 4, // A3 PF4 ADC4
330 1, // A4 PF1 ADC1
331 0, // A5 PF0 ADC0
332 8, // A6 D4 PD4 ADC8
333 10, // A7 D6 PD7 ADC10
334 11, // A8 D8 PB4 ADC11
335 12, // A9 D9 PB5 ADC12
336 13, // A10 D10 PB6 ADC13
337 9 // A11 D12 PD6 ADC9
338};
339
340#endif /* ARDUINO_MAIN */
341
342// These serial port names are intended to allow libraries and architecture-neutral
343// sketches to automatically default to the correct port name for a particular type
344// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
345// the first hardware serial port whose RX/TX pins are not dedicated to another use.
346//
347// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
348//
349// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
350//
351// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
352//
353// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
354//
355// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
356// pins are NOT connected to anything by default.
357#define SERIAL_PORT_MONITOR Serial
358#define SERIAL_PORT_USBVIRTUAL Serial
359#define SERIAL_PORT_HARDWARE Serial1
360#define SERIAL_PORT_HARDWARE_OPEN Serial1
361
362#endif /* Pins_Arduino_h */
diff --git a/keyboards/treadstone48/serial.c b/keyboards/treadstone48/serial.c
index 6006ebf1b..674c42d59 100644
--- a/keyboards/treadstone48/serial.c
+++ b/keyboards/treadstone48/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/keyboards/yosino58/pro_micro.h b/keyboards/yosino58/pro_micro.h
deleted file mode 100644
index 366633372..000000000
--- a/keyboards/yosino58/pro_micro.h
+++ /dev/null
@@ -1,358 +0,0 @@
1/*
2 pins_arduino.h - Pin definition functions for Arduino
3 Part of Arduino - http://www.arduino.cc/
4
5 Copyright (c) 2007 David A. Mellis
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General
18 Public License along with this library; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 Boston, MA 02111-1307 USA
21
22 $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
23*/
24#pragma once
25
26#include <avr/pgmspace.h>
27
28// Workaround for wrong definitions in "iom32u4.h".
29// This should be fixed in the AVR toolchain.
30#undef UHCON
31#undef UHINT
32#undef UHIEN
33#undef UHADDR
34#undef UHFNUM
35#undef UHFNUML
36#undef UHFNUMH
37#undef UHFLEN
38#undef UPINRQX
39#undef UPINTX
40#undef UPNUM
41#undef UPRST
42#undef UPCONX
43#undef UPCFG0X
44#undef UPCFG1X
45#undef UPSTAX
46#undef UPCFG2X
47#undef UPIENX
48#undef UPDATX
49#undef TCCR2A
50#undef WGM20
51#undef WGM21
52#undef COM2B0
53#undef COM2B1
54#undef COM2A0
55#undef COM2A1
56#undef TCCR2B
57#undef CS20
58#undef CS21
59#undef CS22
60#undef WGM22
61#undef FOC2B
62#undef FOC2A
63#undef TCNT2
64#undef TCNT2_0
65#undef TCNT2_1
66#undef TCNT2_2
67#undef TCNT2_3
68#undef TCNT2_4
69#undef TCNT2_5
70#undef TCNT2_6
71#undef TCNT2_7
72#undef OCR2A
73#undef OCR2_0
74#undef OCR2_1
75#undef OCR2_2
76#undef OCR2_3
77#undef OCR2_4
78#undef OCR2_5
79#undef OCR2_6
80#undef OCR2_7
81#undef OCR2B
82#undef OCR2_0
83#undef OCR2_1
84#undef OCR2_2
85#undef OCR2_3
86#undef OCR2_4
87#undef OCR2_5
88#undef OCR2_6
89#undef OCR2_7
90
91#define NUM_DIGITAL_PINS 30
92#define NUM_ANALOG_INPUTS 12
93
94#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
95#define TXLED0 PORTD |= (1<<5)
96#define TXLED1 PORTD &= ~(1<<5)
97#define RXLED0 PORTB |= (1<<0)
98#define RXLED1 PORTB &= ~(1<<0)
99
100static const uint8_t SDA = 2;
101static const uint8_t SCL = 3;
102#define LED_BUILTIN 13
103
104// Map SPI port to 'new' pins D14..D17
105static const uint8_t SS = 17;
106static const uint8_t MOSI = 16;
107static const uint8_t MISO = 14;
108static const uint8_t SCK = 15;
109
110// Mapping of analog pins as digital I/O
111// A6-A11 share with digital pins
112static const uint8_t ADC0 = 18;
113static const uint8_t ADC1 = 19;
114static const uint8_t ADC2 = 20;
115static const uint8_t ADC3 = 21;
116static const uint8_t ADC4 = 22;
117static const uint8_t ADC5 = 23;
118static const uint8_t ADC6 = 24; // D4
119static const uint8_t ADC7 = 25; // D6
120static const uint8_t ADC8 = 26; // D8
121static const uint8_t ADC9 = 27; // D9
122static const uint8_t ADC10 = 28; // D10
123static const uint8_t ADC11 = 29; // D12
124
125#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
126#define digitalPinToPCICRbit(p) 0
127#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
128#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
129
130// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
131extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
132#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
133
134#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
135
136#ifdef ARDUINO_MAIN
137
138// On the Arduino board, digital pins are also used
139// for the analog output (software PWM). Analog input
140// pins are a separate set.
141
142// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
143//
144// D0 PD2 RXD1/INT2
145// D1 PD3 TXD1/INT3
146// D2 PD1 SDA SDA/INT1
147// D3# PD0 PWM8/SCL OC0B/SCL/INT0
148// D4 A6 PD4 ADC8
149// D5# PC6 ??? OC3A/#OC4A
150// D6# A7 PD7 FastPWM #OC4D/ADC10
151// D7 PE6 INT6/AIN0
152//
153// D8 A8 PB4 ADC11/PCINT4
154// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
155// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
156// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
157// D12 A11 PD6 T1/#OC4D/ADC9
158// D13# PC7 PWM10 CLK0/OC4A
159//
160// A0 D18 PF7 ADC7
161// A1 D19 PF6 ADC6
162// A2 D20 PF5 ADC5
163// A3 D21 PF4 ADC4
164// A4 D22 PF1 ADC1
165// A5 D23 PF0 ADC0
166//
167// New pins D14..D17 to map SPI port to digital pins
168//
169// MISO D14 PB3 MISO,PCINT3
170// SCK D15 PB1 SCK,PCINT1
171// MOSI D16 PB2 MOSI,PCINT2
172// SS D17 PB0 RXLED,SS/PCINT0
173//
174// Connected LEDs on board for TX and RX
175// TXLED D24 PD5 XCK1
176// RXLED D17 PB0
177// HWB PE2 HWB
178
179// these arrays map port names (e.g. port B) to the
180// appropriate addresses for various functions (e.g. reading
181// and writing)
182const uint16_t PROGMEM port_to_mode_PGM[] = {
183 NOT_A_PORT,
184 NOT_A_PORT,
185 (uint16_t) &DDRB,
186 (uint16_t) &DDRC,
187 (uint16_t) &DDRD,
188 (uint16_t) &DDRE,
189 (uint16_t) &DDRF,
190};
191
192const uint16_t PROGMEM port_to_output_PGM[] = {
193 NOT_A_PORT,
194 NOT_A_PORT,
195 (uint16_t) &PORTB,
196 (uint16_t) &PORTC,
197 (uint16_t) &PORTD,
198 (uint16_t) &PORTE,
199 (uint16_t) &PORTF,
200};
201
202const uint16_t PROGMEM port_to_input_PGM[] = {
203 NOT_A_PORT,
204 NOT_A_PORT,
205 (uint16_t) &PINB,
206 (uint16_t) &PINC,
207 (uint16_t) &PIND,
208 (uint16_t) &PINE,
209 (uint16_t) &PINF,
210};
211
212const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
213 PD, // D0 - PD2
214 PD, // D1 - PD3
215 PD, // D2 - PD1
216 PD, // D3 - PD0
217 PD, // D4 - PD4
218 PC, // D5 - PC6
219 PD, // D6 - PD7
220 PE, // D7 - PE6
221
222 PB, // D8 - PB4
223 PB, // D9 - PB5
224 PB, // D10 - PB6
225 PB, // D11 - PB7
226 PD, // D12 - PD6
227 PC, // D13 - PC7
228
229 PB, // D14 - MISO - PB3
230 PB, // D15 - SCK - PB1
231 PB, // D16 - MOSI - PB2
232 PB, // D17 - SS - PB0
233
234 PF, // D18 - A0 - PF7
235 PF, // D19 - A1 - PF6
236 PF, // D20 - A2 - PF5
237 PF, // D21 - A3 - PF4
238 PF, // D22 - A4 - PF1
239 PF, // D23 - A5 - PF0
240
241 PD, // D24 - PD5
242 PD, // D25 / D6 - A7 - PD7
243 PB, // D26 / D8 - A8 - PB4
244 PB, // D27 / D9 - A9 - PB5
245 PB, // D28 / D10 - A10 - PB6
246 PD, // D29 / D12 - A11 - PD6
247};
248
249const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
250 _BV(2), // D0 - PD2
251 _BV(3), // D1 - PD3
252 _BV(1), // D2 - PD1
253 _BV(0), // D3 - PD0
254 _BV(4), // D4 - PD4
255 _BV(6), // D5 - PC6
256 _BV(7), // D6 - PD7
257 _BV(6), // D7 - PE6
258
259 _BV(4), // D8 - PB4
260 _BV(5), // D9 - PB5
261 _BV(6), // D10 - PB6
262 _BV(7), // D11 - PB7
263 _BV(6), // D12 - PD6
264 _BV(7), // D13 - PC7
265
266 _BV(3), // D14 - MISO - PB3
267 _BV(1), // D15 - SCK - PB1
268 _BV(2), // D16 - MOSI - PB2
269 _BV(0), // D17 - SS - PB0
270
271 _BV(7), // D18 - A0 - PF7
272 _BV(6), // D19 - A1 - PF6
273 _BV(5), // D20 - A2 - PF5
274 _BV(4), // D21 - A3 - PF4
275 _BV(1), // D22 - A4 - PF1
276 _BV(0), // D23 - A5 - PF0
277
278 _BV(5), // D24 - PD5
279 _BV(7), // D25 / D6 - A7 - PD7
280 _BV(4), // D26 / D8 - A8 - PB4
281 _BV(5), // D27 / D9 - A9 - PB5
282 _BV(6), // D28 / D10 - A10 - PB6
283 _BV(6), // D29 / D12 - A11 - PD6
284};
285
286const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
287 NOT_ON_TIMER,
288 NOT_ON_TIMER,
289 NOT_ON_TIMER,
290 TIMER0B, /* 3 */
291 NOT_ON_TIMER,
292 TIMER3A, /* 5 */
293 TIMER4D, /* 6 */
294 NOT_ON_TIMER,
295
296 NOT_ON_TIMER,
297 TIMER1A, /* 9 */
298 TIMER1B, /* 10 */
299 TIMER0A, /* 11 */
300
301 NOT_ON_TIMER,
302 TIMER4A, /* 13 */
303
304 NOT_ON_TIMER,
305 NOT_ON_TIMER,
306 NOT_ON_TIMER,
307 NOT_ON_TIMER,
308 NOT_ON_TIMER,
309 NOT_ON_TIMER,
310
311 NOT_ON_TIMER,
312 NOT_ON_TIMER,
313 NOT_ON_TIMER,
314 NOT_ON_TIMER,
315 NOT_ON_TIMER,
316 NOT_ON_TIMER,
317 NOT_ON_TIMER,
318 NOT_ON_TIMER,
319 NOT_ON_TIMER,
320 NOT_ON_TIMER,
321};
322
323const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
324 7, // A0 PF7 ADC7
325 6, // A1 PF6 ADC6
326 5, // A2 PF5 ADC5
327 4, // A3 PF4 ADC4
328 1, // A4 PF1 ADC1
329 0, // A5 PF0 ADC0
330 8, // A6 D4 PD4 ADC8
331 10, // A7 D6 PD7 ADC10
332 11, // A8 D8 PB4 ADC11
333 12, // A9 D9 PB5 ADC12
334 13, // A10 D10 PB6 ADC13
335 9 // A11 D12 PD6 ADC9
336};
337
338#endif /* ARDUINO_MAIN */
339
340// These serial port names are intended to allow libraries and architecture-neutral
341// sketches to automatically default to the correct port name for a particular type
342// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
343// the first hardware serial port whose RX/TX pins are not dedicated to another use.
344//
345// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
346//
347// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
348//
349// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
350//
351// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
352//
353// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
354// pins are NOT connected to anything by default.
355#define SERIAL_PORT_MONITOR Serial
356#define SERIAL_PORT_USBVIRTUAL Serial
357#define SERIAL_PORT_HARDWARE Serial1
358#define SERIAL_PORT_HARDWARE_OPEN Serial1
diff --git a/keyboards/yosino58/serial.c b/keyboards/yosino58/serial.c
index 325c29a3f..f6293c3dc 100644
--- a/keyboards/yosino58/serial.c
+++ b/keyboards/yosino58/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/keyboards/zinc/serial.c b/keyboards/zinc/serial.c
index 325c29a3f..f6293c3dc 100644
--- a/keyboards/zinc/serial.c
+++ b/keyboards/zinc/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22
diff --git a/quantum/split_common/serial.c b/quantum/split_common/serial.c
index c4ef2a97e..c27cbfdd0 100644
--- a/quantum/split_common/serial.c
+++ b/quantum/split_common/serial.c
@@ -17,7 +17,6 @@
17#include <stddef.h> 17#include <stddef.h>
18#include <stdbool.h> 18#include <stdbool.h>
19#include "serial.h" 19#include "serial.h"
20//#include <pro_micro.h>
21 20
22#ifdef SOFT_SERIAL_PIN 21#ifdef SOFT_SERIAL_PIN
23 22