d09a06a1b354760fd0e64a453abade972900e885
- Author
- Ryan <fauxpark@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/keyboards/3w6/rev1/matrix.c b/keyboards/3w6/rev1/matrix.c
2index aa3e43fbe053781469eed028c9e2c136dc0bcd26..0c06a743a188ce51665b42054fe6661425d1633f 100644
3--- a/keyboards/3w6/rev1/matrix.c
4+++ b/keyboards/3w6/rev1/matrix.c
5@@ -165,8 +165,8 @@ static void init_cols(void) {
6 pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L;
7 for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) {
8 pin_t pin = matrix_col_pins_mcu[pin_index];
9- setPinInput(pin);
10- writePinHigh(pin);
11+ gpio_set_pin_input(pin);
12+ gpio_write_pin_high(pin);
13 }
14 }
15
16@@ -177,7 +177,7 @@ static matrix_row_t read_cols(uint8_t row) {
17 // For each col...
18 for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
19 // Select the col pin to read (active low)
20- uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
21+ uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]);
22
23 // Populate the matrix row with the state of the col pin
24 current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
25@@ -223,8 +223,8 @@ static void unselect_rows(void) {
26 pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L;
27 for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) {
28 pin_t pin = matrix_row_pins_mcu[pin_index];
29- setPinInput(pin);
30- writePinLow(pin);
31+ gpio_set_pin_input(pin);
32+ gpio_write_pin_low(pin);
33 }
34 }
35
36@@ -236,8 +236,8 @@ static void select_row(uint8_t row) {
37 // select on atmega32u4
38 pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L;
39 pin_t pin = matrix_row_pins_mcu[row];
40- setPinOutput(pin);
41- writePinLow(pin);
42+ gpio_set_pin_output(pin);
43+ gpio_write_pin_low(pin);
44 } else {
45 // select on tca9555
46 if (tca9555_status) { // if there was an error
47diff --git a/keyboards/3w6/rev2/matrix.c b/keyboards/3w6/rev2/matrix.c
48index da7a5344e5f9b9e6b159cb369c680d27364e2bf7..8c628215aaf5cde92aef6744ae4999f14b09f720 100644
49--- a/keyboards/3w6/rev2/matrix.c
50+++ b/keyboards/3w6/rev2/matrix.c
51@@ -165,8 +165,8 @@ static void init_cols(void) {
52 pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L;
53 for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) {
54 pin_t pin = matrix_col_pins_mcu[pin_index];
55- setPinInput(pin);
56- writePinHigh(pin);
57+ gpio_set_pin_input(pin);
58+ gpio_write_pin_high(pin);
59 }
60 }
61
62@@ -177,7 +177,7 @@ static matrix_row_t read_cols(uint8_t row) {
63 // For each col...
64 for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) {
65 // Select the col pin to read (active low)
66- uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]);
67+ uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]);
68
69 // Populate the matrix row with the state of the col pin
70 current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
71@@ -221,8 +221,8 @@ static void unselect_rows(void) {
72 pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L;
73 for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) {
74 pin_t pin = matrix_row_pins_mcu[pin_index];
75- setPinInput(pin);
76- writePinLow(pin);
77+ gpio_set_pin_input(pin);
78+ gpio_write_pin_low(pin);
79 }
80 }
81
82@@ -233,8 +233,8 @@ static void select_row(uint8_t row) {
83 // select on atmega32u4
84 pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L;
85 pin_t pin = matrix_row_pins_mcu[row];
86- setPinOutput(pin);
87- writePinLow(pin);
88+ gpio_set_pin_output(pin);
89+ gpio_write_pin_low(pin);
90 } else {
91 // select on tca9555
92 if (tca9555_status) { // if there was an error
93diff --git a/keyboards/40percentclub/4pack/4pack.c b/keyboards/40percentclub/4pack/4pack.c
94index bd2efa562092300885d977b488cc68feebfe98c0..044ce456818a1025dad1de960aa9372ad6b8f1d6 100644
95--- a/keyboards/40percentclub/4pack/4pack.c
96+++ b/keyboards/40percentclub/4pack/4pack.c
97@@ -23,8 +23,8 @@ void matrix_init_kb(void) {
98 // put your keyboard start-up code here
99 // runs once when the firmware starts up
100
101- setPinOutput(F4); // cathodes
102- setPinOutput(F5); // cathodes
103+ gpio_set_pin_output(F4); // cathodes
104+ gpio_set_pin_output(F5); // cathodes
105
106 // Do the rest
107 matrix_init_user();
108diff --git a/keyboards/40percentclub/sixpack/sixpack.c b/keyboards/40percentclub/sixpack/sixpack.c
109index c8c7bad4442af99d60946c882cd9f113ef247151..fa7609c97f79ba7562efff1c700aa353e35fdc97 100644
110--- a/keyboards/40percentclub/sixpack/sixpack.c
111+++ b/keyboards/40percentclub/sixpack/sixpack.c
112@@ -16,9 +16,9 @@
113 #include "quantum.h"
114
115 void matrix_init_kb(void) {
116- setPinOutput(B6); // Backlight cathodes Col.3
117- setPinOutput(F6); // Backlight cathodes Col.2
118- setPinOutput(F7); // Backlight cathodes Col.1
119+ gpio_set_pin_output(B6); // Backlight cathodes Col.3
120+ gpio_set_pin_output(F6); // Backlight cathodes Col.2
121+ gpio_set_pin_output(F7); // Backlight cathodes Col.1
122
123 matrix_init_user();
124 }
125diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c b/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c
126index 2971460bd21a5b850b02949531899bc361567bf7..4586044a94cfc91c38aaf46ad131ca8087634d07 100644
127--- a/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c
128+++ b/keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c
129@@ -17,9 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
130 #include "rev_a.h"
131
132 void board_init(void) {
133- setPinInputHigh(CAPS_PIN);
134- setPinInputHigh(SCROLL_PIN);
135- setPinInputHigh(NUM_PIN);
136+ gpio_set_pin_input_high(CAPS_PIN);
137+ gpio_set_pin_input_high(SCROLL_PIN);
138+ gpio_set_pin_input_high(NUM_PIN);
139 }
140
141 /* Set indicator leds to indicate lock states */
142@@ -27,23 +27,23 @@ bool led_update_kb(led_t led_state) {
143 bool res = led_update_user(led_state);
144 if(res && LOCK_LIGHTS) {
145 if(led_state.caps_lock){
146- setPinOutput(CAPS_PIN);
147- writePin(CAPS_PIN, 0);
148+ gpio_set_pin_output(CAPS_PIN);
149+ gpio_write_pin(CAPS_PIN, 0);
150 }
151 else
152- setPinInputHigh(CAPS_PIN);
153+ gpio_set_pin_input_high(CAPS_PIN);
154 if(led_state.scroll_lock){
155- setPinOutput(SCROLL_PIN);
156- writePin(SCROLL_PIN, 0);
157+ gpio_set_pin_output(SCROLL_PIN);
158+ gpio_write_pin(SCROLL_PIN, 0);
159 }
160 else
161- setPinInputHigh(SCROLL_PIN);
162+ gpio_set_pin_input_high(SCROLL_PIN);
163 if(led_state.num_lock){
164- setPinOutput(NUM_PIN);
165- writePin(NUM_PIN, 0);
166+ gpio_set_pin_output(NUM_PIN);
167+ gpio_write_pin(NUM_PIN, 0);
168 }
169 else
170- setPinInputHigh(NUM_PIN);
171+ gpio_set_pin_input_high(NUM_PIN);
172 }
173 return res;
174 }
175@@ -59,50 +59,50 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
176 void setLayerLed(layer_state_t state){
177 switch(get_highest_layer(state)){
178 case 0 :
179- setPinOutput(LAYER_1);
180- writePin(LAYER_1, 0);
181- setPinInputHigh(LAYER_2);
182- setPinInputHigh(LAYER_3);
183- setPinInputHigh(LAYER_4);
184- setPinInputHigh(LAYER_5);
185+ gpio_set_pin_output(LAYER_1);
186+ gpio_write_pin(LAYER_1, 0);
187+ gpio_set_pin_input_high(LAYER_2);
188+ gpio_set_pin_input_high(LAYER_3);
189+ gpio_set_pin_input_high(LAYER_4);
190+ gpio_set_pin_input_high(LAYER_5);
191 break;
192 case 1 :
193- setPinOutput(LAYER_2);
194- writePin(LAYER_2, 0);
195- setPinInputHigh(LAYER_1);
196- setPinInputHigh(LAYER_3);
197- setPinInputHigh(LAYER_4);
198- setPinInputHigh(LAYER_5);
199+ gpio_set_pin_output(LAYER_2);
200+ gpio_write_pin(LAYER_2, 0);
201+ gpio_set_pin_input_high(LAYER_1);
202+ gpio_set_pin_input_high(LAYER_3);
203+ gpio_set_pin_input_high(LAYER_4);
204+ gpio_set_pin_input_high(LAYER_5);
205 break;
206 case 2 :
207- setPinOutput(LAYER_3);
208- writePin(LAYER_3, 0);
209- setPinInputHigh(LAYER_1);
210- setPinInputHigh(LAYER_2);
211- setPinInputHigh(LAYER_4);
212- setPinInputHigh(LAYER_5);
213+ gpio_set_pin_output(LAYER_3);
214+ gpio_write_pin(LAYER_3, 0);
215+ gpio_set_pin_input_high(LAYER_1);
216+ gpio_set_pin_input_high(LAYER_2);
217+ gpio_set_pin_input_high(LAYER_4);
218+ gpio_set_pin_input_high(LAYER_5);
219 break;
220 case 3 :
221- writePin(LAYER_4, 0);
222- setPinInputHigh(LAYER_5);
223- setPinInputHigh(LAYER_1);
224- setPinInputHigh(LAYER_2);
225- setPinInputHigh(LAYER_3);
226- setPinOutput(LAYER_4);
227+ gpio_write_pin(LAYER_4, 0);
228+ gpio_set_pin_input_high(LAYER_5);
229diff --git a/keyboards/4pplet/eagle_viper_rep/rev_b/rev_b.c b/keyboards/4pplet/eagle_viper_rep/rev_b/rev_b.c
230index 2e71e34a267cb876df93ce8255ac038833c973a4..ab052790c3e53fb4d1cd2c94f6f490f3e252c0a8 100644
231--- a/keyboards/4pplet/eagle_viper_rep/rev_b/rev_b.c
232+++ b/keyboards/4pplet/eagle_viper_rep/rev_b/rev_b.c
233@@ -17,11 +17,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
234 #include "rev_b.h"
235
236 void keyboard_pre_init_kb(void) {
237- setPinOutput(LAYER_1);
238- setPinOutput(LAYER_2);
239- setPinOutput(LAYER_3);
240- setPinOutput(LAYER_4);
241- setPinOutput(LAYER_5);
242+ gpio_set_pin_output(LAYER_1);
243+ gpio_set_pin_output(LAYER_2);
244+ gpio_set_pin_output(LAYER_3);
245+ gpio_set_pin_output(LAYER_4);
246+ gpio_set_pin_output(LAYER_5);
247 keyboard_pre_init_user();
248 }
249
250@@ -32,26 +32,26 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
251 }
252 /* Set indicator leds to indicate which layer is active */
253 void setLayerLed(layer_state_t state){
254- writePinLow(LAYER_1);
255- writePinLow(LAYER_2);
256- writePinLow(LAYER_3);
257- writePinLow(LAYER_4);
258- writePinLow(LAYER_5);
259+ gpio_write_pin_low(LAYER_1);
260+ gpio_write_pin_low(LAYER_2);
261+ gpio_write_pin_low(LAYER_3);
262+ gpio_write_pin_low(LAYER_4);
263+ gpio_write_pin_low(LAYER_5);
264 switch (get_highest_layer(state)) {
265 case 0:
266- writePinHigh(LAYER_1);
267+ gpio_write_pin_high(LAYER_1);
268 break;
269 case 1:
270- writePinHigh(LAYER_2);
271+ gpio_write_pin_high(LAYER_2);
272 break;
273 case 2:
274- writePinHigh(LAYER_3);
275+ gpio_write_pin_high(LAYER_3);
276 break;
277 case 3:
278- writePinHigh(LAYER_4);
279+ gpio_write_pin_high(LAYER_4);
280 break;
281 case 4:
282- writePinHigh(LAYER_5);
283+ gpio_write_pin_high(LAYER_5);
284 break;
285 }
286 }
287diff --git a/keyboards/acheron/apollo/87h/delta/delta.c b/keyboards/acheron/apollo/87h/delta/delta.c
288index 1e79584a9c00bddb99dc2ebfc0af829861f1affb..b17fce5c3a3ad8b20c698af6d0a41069dd7ef489 100644
289--- a/keyboards/acheron/apollo/87h/delta/delta.c
290+++ b/keyboards/acheron/apollo/87h/delta/delta.c
291@@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
292 #include "quantum.h"
293
294 void board_init(void) {
295- setPinInput(B9);
296- setPinInput(B10);
297+ gpio_set_pin_input(B9);
298+ gpio_set_pin_input(B10);
299 }
300
301 led_config_t g_led_config = { {
302diff --git a/keyboards/acheron/apollo/87htsc/87htsc.c b/keyboards/acheron/apollo/87htsc/87htsc.c
303index de66897f72c58d431d456143e58a83e8bfb58e50..4225c34971fcf534a86566299f80035f1379bc45 100644
304--- a/keyboards/acheron/apollo/87htsc/87htsc.c
305+++ b/keyboards/acheron/apollo/87htsc/87htsc.c
306@@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
307 #include "quantum.h"
308
309 void board_init(void) {
310- setPinInput(B9);
311- setPinInput(B10);
312+ gpio_set_pin_input(B9);
313+ gpio_set_pin_input(B10);
314 }
315
316 led_config_t g_led_config = { {
317diff --git a/keyboards/acheron/athena/alpha/alpha.c b/keyboards/acheron/athena/alpha/alpha.c
318index 9e4f82f7ad19bf5735c244c48ceec0dad6ef425a..8fe47eff8219081667a3555729eed04a41cf9c49 100644
319--- a/keyboards/acheron/athena/alpha/alpha.c
320+++ b/keyboards/acheron/athena/alpha/alpha.c
321@@ -17,8 +17,8 @@
322 #include "quantum.h"
323
324 void board_init(void) {
325- setPinInput(B6);
326- setPinInput(B7);
327+ gpio_set_pin_input(B6);
328+ gpio_set_pin_input(B7);
329 }
330
331 void keyboard_post_init_kb(void){
332@@ -34,10 +34,10 @@ bool led_update_kb(led_t led_state) {
333 bool res = led_update_user(led_state);
334 #ifdef CAPSLOCK_INDICATOR
335 if(res) {
336- writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock);
337+ gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock);
338 }
339 #else
340- writePin(LED_CAPS_LOCK_PIN, 0);
341+ gpio_write_pin(LED_CAPS_LOCK_PIN, 0);
342 #endif
343 return res;
344 }
345diff --git a/keyboards/acheron/athena/beta/beta.c b/keyboards/acheron/athena/beta/beta.c
346index 9ad9c71cc88dd49dddcb8f543a98018de738346a..fe22128437138dc34b3686af9a133abf9e603f21 100644
347--- a/keyboards/acheron/athena/beta/beta.c
348+++ b/keyboards/acheron/athena/beta/beta.c
349@@ -17,18 +17,18 @@
350 #include "quantum.h"
351
352 void board_init(void) {
353- setPinInput(B6);
354- setPinInput(B7);
355+ gpio_set_pin_input(B6);
356+ gpio_set_pin_input(B7);
357 }
358
359 bool led_update_kb(led_t led_state) {
360 bool res = led_update_user(led_state);
361 #ifdef CAPSLOCK_INDICATOR
362 if(res) {
363- writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock);
364+ gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock);
365 }
366 #else
367- writePin(LED_CAPS_LOCK_PIN, 0);
368+ gpio_write_pin(LED_CAPS_LOCK_PIN, 0);
369 #endif
370 return res;
371 }
372diff --git a/keyboards/acheron/austin/austin.c b/keyboards/acheron/austin/austin.c
373index 5c0a4f642d71dd5ec3fbbd35e541ed07e1b9e887..9a69d1c086570e32eb0f6f4ed8a2f494ddb7cf89 100644
374--- a/keyboards/acheron/austin/austin.c
375+++ b/keyboards/acheron/austin/austin.c
376@@ -1,18 +1,18 @@
377 #include "quantum.h"
378
379 void keyboard_pre_init_kb(void) {
380- setPinOutput(A0);
381- setPinOutput(A1);
382- setPinOutput(A2);
383+ gpio_set_pin_output(A0);
384+ gpio_set_pin_output(A1);
385+ gpio_set_pin_output(A2);
386
387 keyboard_pre_init_user();
388 }
389
390 bool led_update_kb(led_t led_state) {
391 if (led_update_user(led_state)) {
392- writePin(A2, led_state.num_lock);
393- writePin(A0, led_state.caps_lock);
394- writePin(A1, led_state.scroll_lock);
395+ gpio_write_pin(A2, led_state.num_lock);
396+ gpio_write_pin(A0, led_state.caps_lock);
397+ gpio_write_pin(A1, led_state.scroll_lock);
398 }
399 return true;
400 }
401diff --git a/keyboards/acheron/elongate/delta/delta.c b/keyboards/acheron/elongate/delta/delta.c
402index e621b4495b5b43f9762d89c1de74c7554004c7e4..98b60bae61473e5a37cfeeb9cfe4aca245c4d077 100755
403--- a/keyboards/acheron/elongate/delta/delta.c
404+++ b/keyboards/acheron/elongate/delta/delta.c
405@@ -30,18 +30,18 @@ void led_init_ports(void) {
406 bool led_update_kb(led_t led_state) {
407 bool res = led_update_user(led_state);
408 if(res) {
409- writePin(LED1_PIN, !led_state.num_lock);
410- writePin(LED2_PIN, !led_state.caps_lock);
411- writePin(LED3_PIN, !led_state.scroll_lock);
412+ gpio_write_pin(LED1_PIN, !led_state.num_lock);
413+ gpio_write_pin(LED2_PIN, !led_state.caps_lock);
414+ gpio_write_pin(LED3_PIN, !led_state.scroll_lock);
415 }
416 return res;
417 }
418
419 // Turns off all bottom LEDs
420 void turn_off_bottom_leds(void){
421- writePin(LED4_PIN, 1);
422- writePin(LED5_PIN, 1);
423- writePin(LED6_PIN, 1);
424+ gpio_write_pin(LED4_PIN, 1);
425+ gpio_write_pin(LED5_PIN, 1);
426+ gpio_write_pin(LED6_PIN, 1);
427 }
428
429 /*
430@@ -53,19 +53,19 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
431 switch (get_highest_layer(state)) {
432 // The base layer, or layer zero, will be handled by the default case.
433 case 1:
434- writePin(LED4_PIN, 1);
435- writePin(LED5_PIN, 0);
436- writePin(LED6_PIN, 1);
437+ gpio_write_pin(LED4_PIN, 1);
438+ gpio_write_pin(LED5_PIN, 0);
439+ gpio_write_pin(LED6_PIN, 1);
440 break;
441 case 2:
442- writePin(LED4_PIN, 1);
443- writePin(LED5_PIN, 1);
444- writePin(LED6_PIN, 0);
445+ gpio_write_pin(LED4_PIN, 1);
446+ gpio_write_pin(LED5_PIN, 1);
447+ gpio_write_pin(LED6_PIN, 0);
448 break;
449 default:
450- writePin(LED4_PIN, 0);
451- writePin(LED5_PIN, 1);
452- writePin(LED6_PIN, 1);
453+ gpio_write_pin(LED4_PIN, 0);
454+ gpio_write_pin(LED5_PIN, 1);
455+ gpio_write_pin(LED6_PIN, 1);
456 break;
457 }
458 return state;
459@@ -73,5 +73,5 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
460
461 // Since the keyboard starts at layer 0, the init function starts LED4 as lit up.
462 void keyboard_post_init_kb(void){
463- writePin(LED4_PIN, 0);
464+ gpio_write_pin(LED4_PIN, 0);
465 }
466diff --git a/keyboards/acheron/shark/beta/beta.c b/keyboards/acheron/shark/beta/beta.c
467index 5592353ad766eef01b5440c2543d1d72f5d543b8..647dac60b73e63f2bd0710fbcf721d13bf0f414e 100644
468--- a/keyboards/acheron/shark/beta/beta.c
469+++ b/keyboards/acheron/shark/beta/beta.c
470@@ -17,6 +17,6 @@
471 #include "quantum.h"
472
473 void board_init(void) {
474- setPinInput(B6);
475- setPinInput(B7);
476+ gpio_set_pin_input(B6);
477+ gpio_set_pin_input(B7);
478 }
479diff --git a/keyboards/aeboards/ext65/rev1/rev1.c b/keyboards/aeboards/ext65/rev1/rev1.c
480index adbae948161bdd3ce880fd76dcecde85c457294e..344a2bcb3221f5e4ad5d61febc93b8cb80365746 100644
481--- a/keyboards/aeboards/ext65/rev1/rev1.c
482+++ b/keyboards/aeboards/ext65/rev1/rev1.c
483@@ -19,18 +19,18 @@
484 void keyboard_pre_init_user(void) {
485 // Call the keyboard pre init code.
486 // Set our LED pins as output
487- setPinOutput(D5);
488- setPinOutput(D3);
489- setPinOutput(D2);
490- setPinOutput(D1);
491+ gpio_set_pin_output(D5);
492+ gpio_set_pin_output(D3);
493+ gpio_set_pin_output(D2);
494+ gpio_set_pin_output(D1);
495 }
496
497 bool led_update_kb(led_t led_state) {
498 bool res = led_update_user(led_state);
499 if(res) {
500- writePin(D5, led_state.num_lock);
501- writePin(D3, led_state.caps_lock);
502- writePin(D2, led_state.scroll_lock);
503+ gpio_write_pin(D5, led_state.num_lock);
504+ gpio_write_pin(D3, led_state.caps_lock);
505+ gpio_write_pin(D2, led_state.scroll_lock);
506 }
507 return res;
508 }
509@@ -38,10 +38,10 @@ bool led_update_kb(led_t led_state) {
510 layer_state_t layer_state_set_kb(layer_state_t state) {
511 switch (get_highest_layer(state)) {
512 case 1:
513- writePinHigh(D1);
514+ gpio_write_pin_high(D1);
515 break;
516 default: // for any other layers, or the default layer
517- writePinLow(D1);
518+ gpio_write_pin_low(D1);
519 break;
520 }
521 return layer_state_set_user(state);
522diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c
523index 934553abcfebaa94c533518df1295d61a97e34db..5922b601cd19b5d3f48c88d62cbb57fa2dc9e79c 100644
524--- a/keyboards/aeboards/ext65/rev2/rev2.c
525+++ b/keyboards/aeboards/ext65/rev2/rev2.c
526@@ -71,10 +71,10 @@ bool oled_task_kb(void) {
527 void keyboard_pre_init_kb(void) {
528 // Call the keyboard pre init code.
529 // Set our LED pins as output
530- setPinOutput(B4);
531- setPinOutput(B3);
532- setPinOutput(A15);
533- setPinOutput(A14);
534+ gpio_set_pin_output(B4);
535+ gpio_set_pin_output(B3);
536+ gpio_set_pin_output(A15);
537+ gpio_set_pin_output(A14);
538
539 keyboard_pre_init_user();
540 }
541@@ -82,9 +82,9 @@ void keyboard_pre_init_kb(void) {
542 bool led_update_kb(led_t led_state) {
543 bool res = led_update_user(led_state);
544 if (res) {
545- writePin(B4, led_state.num_lock);
546- writePin(B3, led_state.caps_lock);
547- writePin(A15, led_state.scroll_lock);
548+ gpio_write_pin(B4, led_state.num_lock);
549+ gpio_write_pin(B3, led_state.caps_lock);
550+ gpio_write_pin(A15, led_state.scroll_lock);
551 }
552 return res;
553 }
554@@ -92,10 +92,10 @@ bool led_update_kb(led_t led_state) {
555 layer_state_t layer_state_set_kb(layer_state_t state) {
556 switch (get_highest_layer(state)) {
557 case 1:
558- writePinHigh(A14);
559+ gpio_write_pin_high(A14);
560 break;
561 default: // for any other layers, or the default layer
562- writePinLow(A14);
563+ gpio_write_pin_low(A14);
564 break;
565 }
566 return layer_state_set_user(state);
567diff --git a/keyboards/aeboards/ext65/rev3/rev3.c b/keyboards/aeboards/ext65/rev3/rev3.c
568index b5e27756ec5437fe0a7abbbb652d242061a30707..f8fc2ef5023147f958d3221790a844e04a79f270 100644
569--- a/keyboards/aeboards/ext65/rev3/rev3.c
570+++ b/keyboards/aeboards/ext65/rev3/rev3.c
571@@ -22,16 +22,16 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); }
572 void keyboard_pre_init_user(void) {
573 // Call the keyboard pre init code.
574 // Set our LED pins as output
575- setPinOutput(LED_LAYERS_PIN);
576+ gpio_set_pin_output(LED_LAYERS_PIN);
577 }
578
579 layer_state_t layer_state_set_kb(layer_state_t state) {
580 switch (get_highest_layer(state)) {
581 case 1:
582- writePinHigh(LED_LAYERS_PIN);
583+ gpio_write_pin_high(LED_LAYERS_PIN);
584 break;
585 default: // for any other layers, or the default layer
586- writePinLow(LED_LAYERS_PIN);
587+ gpio_write_pin_low(LED_LAYERS_PIN);
588 break;
589 }
590 return layer_state_set_user(state);
591diff --git a/keyboards/ai03/orbit/orbit.c b/keyboards/ai03/orbit/orbit.c
592index 5097f9cd90a208b3416661d35d76f911f745c0a1..0c1e0dc32eecb5f1f246df2e471fe81a5923903b 100644
593--- a/keyboards/ai03/orbit/orbit.c
594+++ b/keyboards/ai03/orbit/orbit.c
595@@ -19,13 +19,13 @@
596 void led_init_ports(void) {
597 // Initialize indicator LEDs to output
598 if (isLeftHand) {
599- setPinOutput(C6);
600- setPinOutput(B6);
601- setPinOutput(B5);
602+ gpio_set_pin_output(C6);
603+ gpio_set_pin_output(B6);
604+ gpio_set_pin_output(B5);
605 } else {
606- setPinOutput(F6);
607- setPinOutput(F7);
608- setPinOutput(C7);
609+ gpio_set_pin_output(F6);
610+ gpio_set_pin_output(F7);
611+ gpio_set_pin_output(C7);
612 }
613
614 set_layer_indicators(0);
615@@ -40,15 +40,15 @@ void led_toggle(uint8_t id, bool on) {
616 switch (id) {
617 case 0:
618 // Left hand C6
619- writePin(C6, on);
620+ gpio_write_pin(C6, on);
621 break;
622 case 1:
623 // Left hand B6
624- writePin(B6, on);
625+ gpio_write_pin(B6, on);
626 break;
627 case 2:
628 // Left hand B5
629- writePin(B5, on);
630+ gpio_write_pin(B5, on);
631 break;
632 default:
633 break;
634@@ -57,15 +57,15 @@ void led_toggle(uint8_t id, bool on) {
635 switch (id) {
636 case 3:
637 // Right hand F6
638- writePin(F6, on);
639+ gpio_write_pin(F6, on);
640 break;
641 case 4:
642 // Right hand F7
643- writePin(F7, on);
644+ gpio_write_pin(F7, on);
645 break;
646 case 5:
647 // Right hand C7
648- writePin(C7, on);
649+ gpio_write_pin(C7, on);
650 break;
651 default:
652 break;
653diff --git a/keyboards/ai03/vega/vega.c b/keyboards/ai03/vega/vega.c
654index 6ed1651e508c1cfd1bad1f556dd53d9399ead28a..44ded2c85c45b8b50fd56d628d9d5dc950376c28 100644
655--- a/keyboards/ai03/vega/vega.c
656+++ b/keyboards/ai03/vega/vega.c
657@@ -19,8 +19,8 @@
658 void matrix_init_kb(void) {
659 // Initialize indicator LEDs to output
660
661- setPinOutput(B7); // Caps
662- setPinOutput(A5); // Slck
663+ gpio_set_pin_output(B7); // Caps
664+ gpio_set_pin_output(A5); // Slck
665
666 matrix_init_user();
667 }
668@@ -30,8 +30,8 @@ bool led_update_kb(led_t led_state) {
669 bool res = led_update_user(led_state);
670
671 if(res) {
672- writePin(B7, !led_state.caps_lock);
673- writePin(A5, !led_state.scroll_lock);
674+ gpio_write_pin(B7, !led_state.caps_lock);
675+ gpio_write_pin(A5, !led_state.scroll_lock);
676 }
677 return res;
678 }
679diff --git a/keyboards/akko/5087/5087.c b/keyboards/akko/5087/5087.c
680index 7dd614b45655f3a8912670d05c27ec51e5043bb4..746a9a781612ac907679895b1e575e8cd4f67470 100644
681--- a/keyboards/akko/5087/5087.c
682+++ b/keyboards/akko/5087/5087.c
683@@ -137,17 +137,17 @@ enum __layers {
684 // clang-format on
685
686 void matrix_init_kb(void) {
687- setPinOutput(LED_MAC_OS_PIN); // LDE2 MAC\WIN
688- writePinLow(LED_MAC_OS_PIN);
689- setPinOutput(LED_WIN_LOCK_PIN); // LED3 Win Lock
690- writePinLow(LED_WIN_LOCK_PIN);
691+ gpio_set_pin_output(LED_MAC_OS_PIN); // LDE2 MAC\WIN
692+ gpio_write_pin_low(LED_MAC_OS_PIN);
693+ gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock
694+ gpio_write_pin_low(LED_WIN_LOCK_PIN);
695
696 matrix_init_user();
697 }
698
699 void housekeeping_task_kb(void){
700- writePin(LED_MAC_OS_PIN, (get_highest_layer(default_layer_state) == 3));
701- writePin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
702+ gpio_write_pin(LED_MAC_OS_PIN, (get_highest_layer(default_layer_state) == 3));
703+ gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
704 }
705
706 bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
707diff --git a/keyboards/akko/5108/5108.c b/keyboards/akko/5108/5108.c
708index 91526289b6733647873da8f6f5518d4819f7ea1e..7330707f453d2a15a56e9d193886b575a946fb12 100644
709--- a/keyboards/akko/5108/5108.c
710+++ b/keyboards/akko/5108/5108.c
711@@ -148,15 +148,15 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
712 #endif
713
714 void keyboard_pre_init_kb(void) {
715- setPinOutput(LED_WIN_LOCK_PIN); // LED3 Win Lock
716- writePinLow(LED_WIN_LOCK_PIN);
717+ gpio_set_pin_output(LED_WIN_LOCK_PIN); // LED3 Win Lock
718+ gpio_write_pin_low(LED_WIN_LOCK_PIN);
719 keyboard_pre_init_user();
720 }
721
722 bool led_update_kb(led_t led_state) {
723 bool res = led_update_user(led_state);
724 if (res) {
725- writePin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
726+ gpio_write_pin(LED_WIN_LOCK_PIN, keymap_config.no_gui);
727 }
728 return res;
729 }
730diff --git a/keyboards/al1/matrix.c b/keyboards/al1/matrix.c
731index e3d7971f1c2d6e45ead362c7f82deb2dd083418f..508a2b5ea9a1c1e80e60c6a000621c9c59ca90e4 100644
732--- a/keyboards/al1/matrix.c
733+++ b/keyboards/al1/matrix.c
734@@ -48,7 +48,7 @@ static void select_col(uint8_t col) {
735
736 static void init_pins(void) {
737 for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
738- setPinInputHigh(row_pins[x]);
739+ gpio_set_pin_input_high(row_pins[x]);
740 }
741 }
742
743@@ -65,7 +65,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
744 matrix_row_t last_row_value = current_matrix[row_index];
745
746 // Check row pin state
747- if (readPin(row_pins[row_index]) == 0) {
748+ if (gpio_read_pin(row_pins[row_index]) == 0) {
749 // Pin LO, set col bit
750 current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
751 } else {
752diff --git a/keyboards/anavi/knob1/knob1.c b/keyboards/anavi/knob1/knob1.c
753index bb6f1e38bfd08c1499ada170ec69f878b3a68b29..5e63ef4f32c6bebfc36c5af271e05edd7569e0da 100644
754--- a/keyboards/anavi/knob1/knob1.c
755+++ b/keyboards/anavi/knob1/knob1.c
756@@ -6,8 +6,8 @@
757
758 void keyboard_post_init_kb(void) {
759 // Enable RGB LED
760- setPinOutput(GP11);
761- writePinHigh(GP11);
762+ gpio_set_pin_output(GP11);
763+ gpio_write_pin_high(GP11);
764 rgblight_enable();
765
766 // Offload to the user func
767diff --git a/keyboards/anavi/knobs3/knobs3.c b/keyboards/anavi/knobs3/knobs3.c
768index efae0101636f9172cc5dd67b2e9d96dd1c9b0a40..01b3b60c6f42cd59ce8bbbd224a44f56fe410e21 100644
769--- a/keyboards/anavi/knobs3/knobs3.c
770+++ b/keyboards/anavi/knobs3/knobs3.c
771@@ -6,8 +6,8 @@
772
773 void keyboard_post_init_kb(void) {
774 // Enable RGB LED
775- setPinOutput(GP11);
776- writePinHigh(GP11);
777+ gpio_set_pin_output(GP11);
778+ gpio_write_pin_high(GP11);
779 rgblight_enable();
780
781 // Offload to the user func
782diff --git a/keyboards/argyle/matrix.c b/keyboards/argyle/matrix.c
783index d723392a0137d0128d7494626c3b7f92290d69cb..d435b368c228a2820ac73d740a368de728fe7e5a 100644
784--- a/keyboards/argyle/matrix.c
785+++ b/keyboards/argyle/matrix.c
786@@ -26,27 +26,27 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
787
788 static inline void setPinOutput_writeLow(pin_t pin) {
789 ATOMIC_BLOCK_FORCEON {
790- setPinOutput(pin);
791- writePinLow(pin);
792+ gpio_set_pin_output(pin);
793+ gpio_write_pin_low(pin);
794 }
795 }
796
797 static inline void setPinOutput_writeHigh(pin_t pin) {
798 ATOMIC_BLOCK_FORCEON {
799- setPinOutput(pin);
800- writePinHigh(pin);
801+ gpio_set_pin_output(pin);
802+ gpio_write_pin_high(pin);
803 }
804 }
805
806 static inline void setPinInputHigh_atomic(pin_t pin) {
807 ATOMIC_BLOCK_FORCEON {
808- setPinInputHigh(pin);
809+ gpio_set_pin_input_high(pin);
810 }
811 }
812
813 static inline uint8_t readMatrixPin(pin_t pin) {
814 if (pin != NO_PIN) {
815- return (readPin(pin) == 0) ? 0 : 1;
816+ return (gpio_read_pin(pin) == 0) ? 0 : 1;
817 } else {
818 return 1;
819 }
820diff --git a/keyboards/artifact/lvl/rev_hs01/rev_hs01.c b/keyboards/artifact/lvl/rev_hs01/rev_hs01.c
821index 6266ef69ad5b420f651ecc389834d22ccb6e1106..fdbfa8f2727c319601ad6278efba91504700093c 100755
822--- a/keyboards/artifact/lvl/rev_hs01/rev_hs01.c
823+++ b/keyboards/artifact/lvl/rev_hs01/rev_hs01.c
824@@ -17,5 +17,5 @@
825
826 void led_init_ports(void) {
827 // Set our LED pins as open drain outputs
828- setPinOutputOpenDrain(LED_CAPS_LOCK_PIN);
829+ gpio_set_pin_output_open_drain(LED_CAPS_LOCK_PIN);
830 }
831diff --git a/keyboards/atlantis/ps17/ps17.c b/keyboards/atlantis/ps17/ps17.c
832index d660bdee6a9b938840bcbb76b2f65e9864560e25..8caf8a2e8fce8fd09cc21eef0a33c3f50c793ebb 100644
833--- a/keyboards/atlantis/ps17/ps17.c
834+++ b/keyboards/atlantis/ps17/ps17.c
835@@ -5,26 +5,26 @@
836
837 layer_state_t layer_state_set_kb(layer_state_t state) {
838 /* Display current layer using indicator LEDs */
839- writePin(LED_INDICATOR_0_PIN, !IS_LAYER_ON_STATE(state, 1));
840- writePin(LED_INDICATOR_1_PIN, !IS_LAYER_ON_STATE(state, 2));
841- writePin(LED_INDICATOR_2_PIN, !IS_LAYER_ON_STATE(state, 3));
842+ gpio_write_pin(LED_INDICATOR_0_PIN, !IS_LAYER_ON_STATE(state, 1));
843+ gpio_write_pin(LED_INDICATOR_1_PIN, !IS_LAYER_ON_STATE(state, 2));
844+ gpio_write_pin(LED_INDICATOR_2_PIN, !IS_LAYER_ON_STATE(state, 3));
845 return layer_state_set_user(state);
846 }
847
848 void keyboard_pre_init_kb(void) {
849 /* Set indicator LEDs as outputs */
850- setPinOutput(LED_INDICATOR_0_PIN);
851- setPinOutput(LED_INDICATOR_1_PIN);
852- setPinOutput(LED_INDICATOR_2_PIN);
853+ gpio_set_pin_output(LED_INDICATOR_0_PIN);
854+ gpio_set_pin_output(LED_INDICATOR_1_PIN);
855+ gpio_set_pin_output(LED_INDICATOR_2_PIN);
856 keyboard_pre_init_user();
857 }
858
859 #ifdef RGB_MATRIX_ENABLE
860 void suspend_power_down_kb(void) {
861 /* Disable indicator LEDs when going to sleep */
862- writePin(LED_INDICATOR_0_PIN, 1);
863- writePin(LED_INDICATOR_1_PIN, 1);
864- writePin(LED_INDICATOR_2_PIN, 1);
865+ gpio_write_pin(LED_INDICATOR_0_PIN, 1);
866+ gpio_write_pin(LED_INDICATOR_1_PIN, 1);
867+ gpio_write_pin(LED_INDICATOR_2_PIN, 1);
868 suspend_power_down_user();
869 }
870
871diff --git a/keyboards/atomic/atomic.c b/keyboards/atomic/atomic.c
872index 68f3ce97640ca0ffa244931a9be9a32e3ea7dd29..8bfe706da0b95c6e0a218259b4d2f36d9460f243 100644
873--- a/keyboards/atomic/atomic.c
874+++ b/keyboards/atomic/atomic.c
875@@ -21,8 +21,8 @@ void matrix_init_kb(void) {
876 // runs once when the firmware starts up
877
878 // Turn status LED on
879- setPinOutput(E6);
880- writePinHigh(E6);
881+ gpio_set_pin_output(E6);
882+ gpio_write_pin_high(E6);
883
884 matrix_init_user();
885 }
886diff --git a/keyboards/bajjak/bajjak.h b/keyboards/bajjak/bajjak.h
887index c2d2d77ef61e1615400c63c76ad5e84208b09398..cd4ae500535e4f0abe423f5d8dccf2024d50755d 100644
888--- a/keyboards/bajjak/bajjak.h
889+++ b/keyboards/bajjak/bajjak.h
890@@ -53,17 +53,17 @@ uint8_t bajjak_left_leds_update(void);
891 #endif
892
893
894-inline void bajjak_board_led_on(void) { setPinOutput(D6); writePinHigh(D6); }
895-inline void bajjak_right_led_1_on(void) { setPinOutput(B5); writePinHigh(B5); }
896-inline void bajjak_right_led_2_on(void) { setPinOutput(B6); writePinHigh(B6); }
897-inline void bajjak_right_led_3_on(void) { setPinOutput(B7); writePinHigh(B7); }
898-inline void bajjak_right_led_on(uint8_t led) { setPinOutput(led+4); writePinHigh(led+4); }
899-
900-inline void bajjak_board_led_off(void) { setPinInput(D6); writePinLow(D6); }
901-inline void bajjak_right_led_1_off(void) { setPinInput(B5); writePinLow(B5); }
902-inline void bajjak_right_led_2_off(void) { setPinInput(B6); writePinLow(B6); }
903-inline void bajjak_right_led_3_off(void) { setPinInput(B7); writePinLow(B7); }
904-inline void bajjak_right_led_off(uint8_t led) { setPinInput(led+4); writePinLow(led+4); }
905+inline void bajjak_board_led_on(void) { gpio_set_pin_output(D6); gpio_write_pin_high(D6); }
906+inline void bajjak_right_led_1_on(void) { gpio_set_pin_output(B5); gpio_write_pin_high(B5); }
907+inline void bajjak_right_led_2_on(void) { gpio_set_pin_output(B6); gpio_write_pin_high(B6); }
908+inline void bajjak_right_led_3_on(void) { gpio_set_pin_output(B7); gpio_write_pin_high(B7); }
909+inline void bajjak_right_led_on(uint8_t led) { gpio_set_pin_output(led+4); gpio_write_pin_high(led+4); }
910+
911+inline void bajjak_board_led_off(void) { gpio_set_pin_input(D6); gpio_write_pin_low(D6); }
912+inline void bajjak_right_led_1_off(void) { gpio_set_pin_input(B5); gpio_write_pin_low(B5); }
913+inline void bajjak_right_led_2_off(void) { gpio_set_pin_input(B6); gpio_write_pin_low(B6); }
914+inline void bajjak_right_led_3_off(void) { gpio_set_pin_input(B7); gpio_write_pin_low(B7); }
915+inline void bajjak_right_led_off(uint8_t led) { gpio_set_pin_input(led+4); gpio_write_pin_low(led+4); }
916
917 #ifdef LEFT_LEDS
918 bool bajjak_left_led_1;
919diff --git a/keyboards/bajjak/matrix.c b/keyboards/bajjak/matrix.c
920index b0d1ab531f32053495657560a5205f7cde486ad9..5451bf787dcc8c90fdde83dd6771def6378347d6 100644
921--- a/keyboards/bajjak/matrix.c
922+++ b/keyboards/bajjak/matrix.c
923@@ -128,13 +128,13 @@ static void init_cols(void) {
924 // not needed, already done as part of init_mcp23018()
925
926 // init on teensy
927- setPinInputHigh(F0);
928- setPinInputHigh(F1);
929- setPinInputHigh(F4);
930- setPinInputHigh(F5);
931- setPinInputHigh(F6);
932- setPinInputHigh(F7);
933- setPinInputHigh(D7);
934+ gpio_set_pin_input_high(F0);
935+ gpio_set_pin_input_high(F1);
936+ gpio_set_pin_input_high(F4);
937+ gpio_set_pin_input_high(F5);
938+ gpio_set_pin_input_high(F6);
939+ gpio_set_pin_input_high(F7);
940+ gpio_set_pin_input_high(D7);
941 }
942
943 static matrix_row_t read_cols(uint8_t row) {
944@@ -175,13 +175,13 @@ static void unselect_rows(void) {
945 // direction
946
947 // unselect on teensy
948- setPinInput(B0);
949- setPinInput(B1);
950- setPinInput(B2);
951- setPinInput(B3);
952- setPinInput(D2);
953- setPinInput(D3);
954- setPinInput(C6);
955+ gpio_set_pin_input(B0);
956+ gpio_set_pin_input(B1);
957+ gpio_set_pin_input(B2);
958+ gpio_set_pin_input(B3);
959+ gpio_set_pin_input(D2);
960+ gpio_set_pin_input(D3);
961+ gpio_set_pin_input(C6);
962 }
963
964 static void select_row(uint8_t row) {
965@@ -200,32 +200,32 @@ static void select_row(uint8_t row) {
966 // Output low(DDR:1, PORT:0) to select
967 switch (row) {
968 case 7:
969- setPinOutput(B0);
970- writePinLow(B0);
971+ gpio_set_pin_output(B0);
972+ gpio_write_pin_low(B0);
973 break;
974 case 8:
975- setPinOutput(B1);
976- writePinLow(B1);
977+ gpio_set_pin_output(B1);
978+ gpio_write_pin_low(B1);
979 break;
980 case 9:
981- setPinOutput(B2);
982- writePinLow(B2);
983+ gpio_set_pin_output(B2);
984+ gpio_write_pin_low(B2);
985 break;
986 case 10:
987- setPinOutput(B3);
988- writePinLow(B3);
989+ gpio_set_pin_output(B3);
990+ gpio_write_pin_low(B3);
991 break;
992 case 11:
993- setPinOutput(D2);
994- writePinLow(D2);
995+ gpio_set_pin_output(D2);
996+ gpio_write_pin_low(D2);
997 break;
998 case 12:
999- setPinOutput(D3);
1000- writePinLow(D3);
1001+ gpio_set_pin_output(D3);
1002+ gpio_write_pin_low(D3);
1003 break;
1004 case 13:
1005- setPinOutput(C6);
1006- writePinLow(C6);
1007+ gpio_set_pin_output(C6);
1008+ gpio_write_pin_low(C6);
1009 break;
1010 }
1011 }
1012diff --git a/keyboards/bandominedoni/bandominedoni.c b/keyboards/bandominedoni/bandominedoni.c
1013index 2884e41c9c160013bcb29c1d57a06cad35d6d21c..76d9e6cb3b6d78654d84ecd6dfee4a08630564bf 100644
1014--- a/keyboards/bandominedoni/bandominedoni.c
1015+++ b/keyboards/bandominedoni/bandominedoni.c
1016@@ -70,14 +70,14 @@ led_config_t g_led_config = {
1017
1018 #if defined(SPLIT_HAND_MATRIX_GRID)
1019 static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) {
1020- setPinInputHigh(in_pin);
1021- setPinOutput(out_pin);
1022- writePinLow(out_pin);
1023+ gpio_set_pin_input_high(in_pin);
1024+ gpio_set_pin_output(out_pin);
1025+ gpio_write_pin_low(out_pin);
1026 // It's almost unnecessary, but wait until it's down to low, just in case.
1027 wait_us(1);
1028- uint8_t pin_state = readPin(in_pin);
1029+ uint8_t pin_state = gpio_read_pin(in_pin);
1030 // Set out_pin to a setting that is less susceptible to noise.
1031- setPinInputHigh(out_pin);
1032+ gpio_set_pin_input_high(out_pin);
1033 matrix_io_delay(); // Wait for the pull-up to go HIGH.
1034 return pin_state;
1035 }
1036@@ -93,8 +93,8 @@ static enum { UNKNOWN, LEFT, RIGHT } hand_side = UNKNOWN;
1037 if (hand_side == UNKNOWN) {
1038 #if defined(SPLIT_HAND_PIN)
1039 // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
1040- setPinInput(SPLIT_HAND_PIN);
1041- hand_side = readPin(SPLIT_HAND_PIN) ? LEFT : RIGHT;
1042+ gpio_set_pin_input(SPLIT_HAND_PIN);
1043+ hand_side = gpio_read_pin(SPLIT_HAND_PIN) ? LEFT : RIGHT;
1044 return (hand_side == LEFT);
1045 #elif defined(SPLIT_HAND_MATRIX_GRID)
1046 # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT
1047diff --git a/keyboards/barleycorn_smd/matrix.c b/keyboards/barleycorn_smd/matrix.c
1048index d8880364b6654724dcf411398816773318555171..f64e8fcd7fcea6f550efa35ab9f2aafb44eb1095 100644
1049--- a/keyboards/barleycorn_smd/matrix.c
1050+++ b/keyboards/barleycorn_smd/matrix.c
1051@@ -23,17 +23,17 @@ static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
1052
1053 static void unselect_rows(void) {
1054 for(uint8_t x = 0; x < MATRIX_ROWS; x++) {
1055- setPinInputHigh(row_pins[x]);
1056+ gpio_set_pin_input_high(row_pins[x]);
1057 }
1058 }
1059
1060 static void select_row(uint8_t row) {
1061- setPinOutput(row_pins[row]);
1062- writePinLow(row_pins[row]);
1063+ gpio_set_pin_output(row_pins[row]);
1064+ gpio_write_pin_low(row_pins[row]);
1065 }
1066
1067 static void unselect_row(uint8_t row) {
1068- setPinInputHigh(row_pins[row]);
1069+ gpio_set_pin_input_high(row_pins[row]);
1070 }
1071
1072 static void init_pins(void) {
1073@@ -46,7 +46,7 @@ static void init_pins(void) {
1074
1075 for (uint8_t x = 0; x < MATRIX_COLS; x++) {
1076 if ( x < 8 ) {
1077- setPinInputHigh(col_pins[x]);
1078+ gpio_set_pin_input_high(col_pins[x]);
1079 }
1080 }
1081 }
1082@@ -111,7 +111,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
1083 pin_state = port_expander_col_buffer[1] & (1 << 1);
1084 break;
1085 default :
1086- pin_state = readPin(col_pins[col_index]);
1087+ pin_state = gpio_read_pin(col_pins[col_index]);
1088 }
1089
1090 // Populate the matrix row with the state of the col pin
1091diff --git a/keyboards/bastardkb/charybdis/charybdis.c b/keyboards/bastardkb/charybdis/charybdis.c
1092index c9f0e6317283242221e718ce8a275935c1432667..0ee5c3eed97539aa45ddb730789eda1a9b6c9d0f 100644
1093--- a/keyboards/bastardkb/charybdis/charybdis.c
1094+++ b/keyboards/bastardkb/charybdis/charybdis.c
1095@@ -371,12 +371,12 @@ void housekeeping_task_kb(void) {
1096
1097 #if defined(KEYBOARD_bastardkb_charybdis_3x5_blackpill) || defined(KEYBOARD_bastardkb_charybdis_4x6_blackpill)
1098 void keyboard_pre_init_kb(void) {
1099- setPinInputHigh(A0);
1100+ gpio_set_pin_input_high(A0);
1101 keyboard_pre_init_user();
1102 }
1103
1104 void matrix_scan_kb(void) {
1105- if (!readPin(A0)) {
1106+ if (!gpio_read_pin(A0)) {
1107 reset_keyboard();
1108 }
1109 matrix_scan_user();
1110diff --git a/keyboards/bear_face/v1/v1.c b/keyboards/bear_face/v1/v1.c
1111index f4960d917860a1e9e576e0c6c01452c2d3bf8f1e..b64a63f0b430b48573175e518a57d32dd0569622 100644
1112--- a/keyboards/bear_face/v1/v1.c
1113+++ b/keyboards/bear_face/v1/v1.c
1114@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1115
1116 void keyboard_pre_init_kb(void) {
1117 //Sets LED pin as output
1118- setPinOutput(F7);
1119+ gpio_set_pin_output(F7);
1120
1121 keyboard_pre_init_user();
1122 }
1123@@ -28,7 +28,7 @@ bool led_update_kb(led_t led_state) {
1124 // Caps Lock LED indicator toggling code here
1125 bool res = led_update_user(led_state);
1126 if(res) {
1127- writePin(F7, led_state.caps_lock);
1128+ gpio_write_pin(F7, led_state.caps_lock);
1129 }
1130 return res;
1131 }
1132diff --git a/keyboards/bear_face/v2/v2.c b/keyboards/bear_face/v2/v2.c
1133index f4960d917860a1e9e576e0c6c01452c2d3bf8f1e..b64a63f0b430b48573175e518a57d32dd0569622 100644
1134--- a/keyboards/bear_face/v2/v2.c
1135+++ b/keyboards/bear_face/v2/v2.c
1136@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1137
1138 void keyboard_pre_init_kb(void) {
1139 //Sets LED pin as output
1140- setPinOutput(F7);
1141+ gpio_set_pin_output(F7);
1142
1143 keyboard_pre_init_user();
1144 }
1145@@ -28,7 +28,7 @@ bool led_update_kb(led_t led_state) {
1146 // Caps Lock LED indicator toggling code here
1147 bool res = led_update_user(led_state);
1148 if(res) {
1149- writePin(F7, led_state.caps_lock);
1150+ gpio_write_pin(F7, led_state.caps_lock);
1151 }
1152 return res;
1153 }
1154diff --git a/keyboards/bioi/g60/g60.c b/keyboards/bioi/g60/g60.c
1155index 3b387b8760871441633ec680fb22ed657433335d..3fdfef8897a5a88de5c7c7fde89344f169bd86bf 100644
1156--- a/keyboards/bioi/g60/g60.c
1157+++ b/keyboards/bioi/g60/g60.c
1158@@ -15,14 +15,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1159 #include "quantum.h"
1160
1161 void keyboard_pre_init_kb(void) {
1162- setPinOutput(F0);
1163- writePinHigh(F0);
1164+ gpio_set_pin_output(F0);
1165+ gpio_write_pin_high(F0);
1166 keyboard_pre_init_user();
1167 }
1168
1169 bool led_update_kb(led_t led_state) {
1170 if (led_update_user(led_state)) {
1171- writePin(F0, !led_state.caps_lock);
1172+ gpio_write_pin(F0, !led_state.caps_lock);
1173 }
1174 return true;
1175 }
1176diff --git a/keyboards/bioi/morgan65/morgan65.c b/keyboards/bioi/morgan65/morgan65.c
1177index 3b387b8760871441633ec680fb22ed657433335d..3fdfef8897a5a88de5c7c7fde89344f169bd86bf 100644
1178--- a/keyboards/bioi/morgan65/morgan65.c
1179+++ b/keyboards/bioi/morgan65/morgan65.c
1180@@ -15,14 +15,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1181 #include "quantum.h"
1182
1183 void keyboard_pre_init_kb(void) {
1184- setPinOutput(F0);
1185- writePinHigh(F0);
1186+ gpio_set_pin_output(F0);
1187+ gpio_write_pin_high(F0);
1188 keyboard_pre_init_user();
1189 }
1190
1191 bool led_update_kb(led_t led_state) {
1192 if (led_update_user(led_state)) {
1193- writePin(F0, !led_state.caps_lock);
1194+ gpio_write_pin(F0, !led_state.caps_lock);
1195 }
1196 return true;
1197 }
1198diff --git a/keyboards/bioi/s65/s65.c b/keyboards/bioi/s65/s65.c
1199index 1bd6b843479e85d51d3625bce93f2ba28818cf57..e632f31eeb63a2e72cd66a5bced2c70e32c18613 100644
1200--- a/keyboards/bioi/s65/s65.c
1201+++ b/keyboards/bioi/s65/s65.c
1202@@ -14,14 +14,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1203
1204 #include "quantum.h"
1205 void keyboard_pre_init_kb(void) {
1206- setPinOutput(F0);
1207- writePinHigh(F0);
1208+ gpio_set_pin_output(F0);
1209+ gpio_write_pin_high(F0);
1210 keyboard_pre_init_user();
1211 }
1212
1213 bool led_update_kb(led_t led_state) {
1214 if (led_update_user(led_state)) {
1215- writePin(F0, !led_state.caps_lock);
1216+ gpio_write_pin(F0, !led_state.caps_lock);
1217 }
1218 return true;
1219 }
1220diff --git a/keyboards/blu/vimclutch/vimclutch.c b/keyboards/blu/vimclutch/vimclutch.c
1221index 5add11ee4f41082eb7db120e3ea075154ea1e522..6dc8cf765e385e2bc6aaf768effc65763a71317e 100644
1222--- a/keyboards/blu/vimclutch/vimclutch.c
1223+++ b/keyboards/blu/vimclutch/vimclutch.c
1224@@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1225
1226 void keyboard_pre_init_kb(void)
1227 {
1228- setPinOutput(F4);
1229- setPinOutput(F5);
1230+ gpio_set_pin_output(F4);
1231+ gpio_set_pin_output(F5);
1232
1233 keyboard_pre_init_user();
1234 };
1235diff --git a/keyboards/bobpad/bobpad.c b/keyboards/bobpad/bobpad.c
1236index 67b124ace20afd6b691cde0c991631d04de6df2c..83b4dbaad00ca14e1a668123aff23792098b302a 100644
1237--- a/keyboards/bobpad/bobpad.c
1238+++ b/keyboards/bobpad/bobpad.c
1239@@ -19,7 +19,7 @@
1240 bool led_update_kb(led_t led_state) {
1241 if (!led_update_user(led_state)) { return false; }
1242
1243- writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock);
1244+ gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock);
1245 return true;
1246 };
1247
1248diff --git a/keyboards/bpiphany/ghost_squid/ghost_squid.c b/keyboards/bpiphany/ghost_squid/ghost_squid.c
1249index 3ecac66f7a7c2845d07beba94f87763f46deac5b..8ecced34e713ffa320b4a2eb27b38d836be4c2d3 100644
1250--- a/keyboards/bpiphany/ghost_squid/ghost_squid.c
1251+++ b/keyboards/bpiphany/ghost_squid/ghost_squid.c
1252@@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1253 #include "ghost_squid.h"
1254
1255 void keyboard_pre_init_kb(void) {
1256- setPinOutput(D0);
1257- writePinLow(D0);
1258+ gpio_set_pin_output(D0);
1259+ gpio_write_pin_low(D0);
1260 fn_led_off();
1261
1262 keyboard_pre_init_user();
1263diff --git a/keyboards/bpiphany/ghost_squid/ghost_squid.h b/keyboards/bpiphany/ghost_squid/ghost_squid.h
1264index 63d3ea0d5ea6892f09e1edf4b1af84052dd574a0..a227a8760252324bcec9f3c546ce5307cc88b05c 100644
1265--- a/keyboards/bpiphany/ghost_squid/ghost_squid.h
1266+++ b/keyboards/bpiphany/ghost_squid/ghost_squid.h
1267@@ -19,5 +19,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1268
1269 #include "quantum.h"
1270
1271-#define fn_led_on() writePinLow(D0)
1272-#define fn_led_off() writePinHigh(D0)
1273+#define fn_led_on() gpio_write_pin_low(D0)
1274+#define fn_led_off() gpio_write_pin_high(D0)
1275diff --git a/keyboards/bpiphany/ghost_squid/matrix.c b/keyboards/bpiphany/ghost_squid/matrix.c
1276index 802d365cb890f8b00d6cab9b5ab853774eee4f02..ae48f5fc94dd6c6a0fa1520eda83b533709001ad 100644
1277--- a/keyboards/bpiphany/ghost_squid/matrix.c
1278+++ b/keyboards/bpiphany/ghost_squid/matrix.c
1279@@ -55,22 +55,22 @@ void select_col(uint8_t col) {
1280
1281 void matrix_init_custom(void) {
1282 /* Column output pins */
1283- setPinOutput(D1);
1284- setPinOutput(D2);
1285- setPinOutput(D3);
1286- setPinOutput(D4);
1287- setPinOutput(D5);
1288- setPinOutput(D6);
1289+ gpio_set_pin_output(D1);
1290+ gpio_set_pin_output(D2);
1291+ gpio_set_pin_output(D3);
1292+ gpio_set_pin_output(D4);
1293+ gpio_set_pin_output(D5);
1294+ gpio_set_pin_output(D6);
1295
1296 /* Row input pins */
1297- writePinHigh(B0);
1298- writePinHigh(B1);
1299- writePinHigh(B2);
1300- writePinHigh(B3);
1301- writePinHigh(B4);
1302- writePinHigh(B5);
1303- writePinHigh(B6);
1304- writePinHigh(C2);
1305+ gpio_write_pin_high(B0);
1306+ gpio_write_pin_high(B1);
1307+ gpio_write_pin_high(B2);
1308+ gpio_write_pin_high(B3);
1309+ gpio_write_pin_high(B4);
1310+ gpio_write_pin_high(B5);
1311+ gpio_write_pin_high(B6);
1312+ gpio_write_pin_high(C2);
1313 }
1314
1315 bool matrix_scan_custom(matrix_row_t current_matrix[]) {
1316diff --git a/keyboards/capsunlocked/cu75/cu75.c b/keyboards/capsunlocked/cu75/cu75.c
1317index f980b0d9e1302866748cc89211bab28b55ac8439..e04dd74bc8be5ce074abef035cd03f4b598fb0c3 100644
1318--- a/keyboards/capsunlocked/cu75/cu75.c
1319+++ b/keyboards/capsunlocked/cu75/cu75.c
1320@@ -20,12 +20,12 @@ void matrix_init_kb(void)
1321 audio_init();
1322 PLAY_SONG(test_sound);
1323 // Fix port B5
1324- setPinInput(B5);
1325- writePinHigh(B5);
1326+ gpio_set_pin_input(B5);
1327+ gpio_write_pin_high(B5);
1328 #else
1329 // If we're not using the audio pin, drive it low
1330- setPinOutput(C6);
1331- writePinLow(C6);
1332+ gpio_set_pin_output(C6);
1333+ gpio_write_pin_low(C6);
1334 #endif
1335 }
1336
1337diff --git a/keyboards/capsunlocked/cu80/v2/v2.c b/keyboards/capsunlocked/cu80/v2/v2.c
1338index e450082ba2366c6b30f88b7e32d2b6ac61239298..4e0e8cad767d374ef546cb8b8ce96730b53140bf 100644
1339--- a/keyboards/capsunlocked/cu80/v2/v2.c
1340+++ b/keyboards/capsunlocked/cu80/v2/v2.c
1341@@ -3,7 +3,7 @@
1342 #include "quantum.h"
1343
1344 void matrix_init_kb(void) {
1345- setPinOutput(E6);
1346+ gpio_set_pin_output(E6);
1347 matrix_init_user();
1348 }
1349
1350diff --git a/keyboards/centromere/centromere.c b/keyboards/centromere/centromere.c
1351index 8d46520e38e20651fdf2c52b4c95b1b3b65e8432..61b9e073f37731e0817161a1e154fc8ed5f004a6 100644
1352--- a/keyboards/centromere/centromere.c
1353+++ b/keyboards/centromere/centromere.c
1354@@ -2,23 +2,23 @@
1355
1356 void led_init(void) {
1357 #if MCU == atmega32u2
1358- setPinOutput(C4); // Set red LED pin as output
1359- setPinOutput(C5); // Set blue LED pin as output
1360- setPinOutput(D1); // Set green LED pin as output
1361+ gpio_set_pin_output(C4); // Set red LED pin as output
1362+ gpio_set_pin_output(C5); // Set blue LED pin as output
1363+ gpio_set_pin_output(D1); // Set green LED pin as output
1364
1365- writePinHigh(C4); // Turn off red LED pin
1366- writePinHigh(C5); // Turn off blue LED pin
1367- writePinHigh(D1); // Turn off green LED pin
1368+ gpio_write_pin_high(C4); // Turn off red LED pin
1369+ gpio_write_pin_high(C5); // Turn off blue LED pin
1370+ gpio_write_pin_high(D1); // Turn off green LED pin
1371
1372 #else
1373
1374- setPinOutput(F4); // Set red LED pin as output
1375- setPinOutput(F5); // Set blue LED pin as output
1376- setPinOutput(D1); // Set green LED pin as output
1377+ gpio_set_pin_output(F4); // Set red LED pin as output
1378+ gpio_set_pin_output(F5); // Set blue LED pin as output
1379+ gpio_set_pin_output(D1); // Set green LED pin as output
1380
1381- writePinHigh(F4); // Turn off red LED pin
1382- writePinHigh(F5); // Turn off blue LED pin
1383- writePinHigh(D1); // Turn off green LED pin
1384+ gpio_write_pin_high(F4); // Turn off red LED pin
1385+ gpio_write_pin_high(F5); // Turn off blue LED pin
1386+ gpio_write_pin_high(D1); // Turn off green LED pin
1387
1388 #endif
1389
1390diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h
1391index 078cdca07f16274a8dec0a9d77a8340261a11adc..32c2ae6e16163dfd7a5fe33b71da1a74d28f43bb 100644
1392--- a/keyboards/centromere/centromere.h
1393+++ b/keyboards/centromere/centromere.h
1394@@ -3,21 +3,21 @@
1395 #include "quantum.h"
1396
1397 #if MCU == atmega32u2
1398-#define red_led_off writePinHigh(C5)
1399-#define red_led_on writePinLow(C5)
1400-#define blu_led_off writePinHigh(C4)
1401-#define blu_led_on writePinLow(C4)
1402+#define red_led_off gpio_write_pin_high(C5)
1403+#define red_led_on gpio_write_pin_low(C5)
1404+#define blu_led_off gpio_write_pin_high(C4)
1405+#define blu_led_on gpio_write_pin_low(C4)
1406
1407 #else
1408-#define red_led_off writePinHigh(F5)
1409-#define red_led_on writePinLow(F5)
1410-#define blu_led_off writePinHigh(F4)
1411-#define blu_led_on writePinLow(F4)
1412+#define red_led_off gpio_write_pin_high(F5)
1413+#define red_led_on gpio_write_pin_low(F5)
1414+#define blu_led_off gpio_write_pin_high(F4)
1415+#define blu_led_on gpio_write_pin_low(F4)
1416
1417 #endif
1418
1419-#define grn_led_off writePinHigh(D1)
1420-#define grn_led_on writePinLow(D1)
1421+#define grn_led_off gpio_write_pin_high(D1)
1422+#define grn_led_on gpio_write_pin_low(D1)
1423
1424 #define set_led_off red_led_off; blu_led_off
1425 #define set_led_red red_led_on; grn_led_off; blu_led_off
1426diff --git a/keyboards/cheshire/curiosity/curiosity.c b/keyboards/cheshire/curiosity/curiosity.c
1427index 9db2651e9419da9fb563545bbbdf4e12ddd273b0..2813cff9b4a03401613a9403992226999b16c21e 100644
1428--- a/keyboards/cheshire/curiosity/curiosity.c
1429+++ b/keyboards/cheshire/curiosity/curiosity.c
1430@@ -1,17 +1,17 @@
1431 #include "quantum.h"
1432
1433 void matrix_init_board(void){
1434- setPinOutput(A8);
1435- setPinOutput(A9);
1436- setPinOutput(A10);
1437+ gpio_set_pin_output(A8);
1438+ gpio_set_pin_output(A9);
1439+ gpio_set_pin_output(A10);
1440 }
1441
1442 bool led_update_kb(led_t led_state) {
1443 bool runDefault = led_update_user(led_state);
1444 if (runDefault) {
1445- writePin(A8, !led_state.num_lock);
1446- writePin(A9, !led_state.caps_lock);
1447- writePin(A10, !led_state.scroll_lock);
1448+ gpio_write_pin(A8, !led_state.num_lock);
1449+ gpio_write_pin(A9, !led_state.caps_lock);
1450+ gpio_write_pin(A10, !led_state.scroll_lock);
1451 }
1452 return runDefault;
1453 }
1454diff --git a/keyboards/cipulot/common/ec_switch_matrix.c b/keyboards/cipulot/common/ec_switch_matrix.c
1455index 845ef99d223421b04238236a7ecab757af437c74..33123bd236e1ef4a7035798f2dd0baaa92626ec6 100644
1456--- a/keyboards/cipulot/common/ec_switch_matrix.c
1457+++ b/keyboards/cipulot/common/ec_switch_matrix.c
1458@@ -54,19 +54,19 @@ static adc_mux adcMux;
1459 void init_row(void) {
1460 // Set all row pins as output and low
1461 for (uint8_t idx = 0; idx < MATRIX_ROWS; idx++) {
1462- setPinOutput(row_pins[idx]);
1463- writePinLow(row_pins[idx]);
1464+ gpio_set_pin_output(row_pins[idx]);
1465+ gpio_write_pin_low(row_pins[idx]);
1466 }
1467 }
1468
1469 // Initialize the multiplexers
1470 void init_amux(void) {
1471 for (uint8_t idx = 0; idx < AMUX_COUNT; idx++) {
1472- setPinOutput(amux_en_pins[idx]);
1473- writePinLow(amux_en_pins[idx]);
1474+ gpio_set_pin_output(amux_en_pins[idx]);
1475+ gpio_write_pin_low(amux_en_pins[idx]);
1476 }
1477 for (uint8_t idx = 0; idx < AMUX_SEL_PINS_COUNT; idx++) {
1478- setPinOutput(amux_sel_pins[idx]);
1479+ gpio_set_pin_output(amux_sel_pins[idx]);
1480 }
1481 }
1482
1483@@ -75,13 +75,13 @@ void select_amux_channel(uint8_t channel, uint8_t col) {
1484 // Get the channel for the specified multiplexer
1485 uint8_t ch = amux_n_col_channels[channel][col];
1486 // momentarily disable specified multiplexer
1487- writePinHigh(amux_en_pins[channel]);
1488+ gpio_write_pin_high(amux_en_pins[channel]);
1489 // Select the multiplexer channel
1490 for (uint8_t i = 0; i < AMUX_SEL_PINS_COUNT; i++) {
1491- writePin(amux_sel_pins[i], ch & (1 << i));
1492+ gpio_write_pin(amux_sel_pins[i], ch & (1 << i));
1493 }
1494 // re enable specified multiplexer
1495- writePinLow(amux_en_pins[channel]);
1496+ gpio_write_pin_low(amux_en_pins[channel]);
1497 }
1498
1499 // Disable all the unused multiplexers
1500@@ -89,28 +89,28 @@ void disable_unused_amux(uint8_t channel) {
1501 // disable all the other multiplexers apart from the current selected one
1502 for (uint8_t idx = 0; idx < AMUX_COUNT; idx++) {
1503 if (idx != channel) {
1504- writePinHigh(amux_en_pins[idx]);
1505+ gpio_write_pin_high(amux_en_pins[idx]);
1506 }
1507 }
1508 }
1509 // Discharge the peak hold capacitor
1510 void discharge_capacitor(void) {
1511 #ifdef OPEN_DRAIN_SUPPORT
1512- writePinLow(DISCHARGE_PIN);
1513+ gpio_write_pin_low(DISCHARGE_PIN);
1514 #else
1515- writePinLow(DISCHARGE_PIN);
1516- setPinOutput(DISCHARGE_PIN);
1517+ gpio_write_pin_low(DISCHARGE_PIN);
1518+ gpio_set_pin_output(DISCHARGE_PIN);
1519 #endif
1520 }
1521
1522 // Charge the peak hold capacitor
1523 void charge_capacitor(uint8_t row) {
1524 #ifdef OPEN_DRAIN_SUPPORT
1525- writePinHigh(DISCHARGE_PIN);
1526+ gpio_write_pin_high(DISCHARGE_PIN);
1527 #else
1528- setPinInput(DISCHARGE_PIN);
1529+ gpio_set_pin_input(DISCHARGE_PIN);
1530 #endif
1531- writePinHigh(row_pins[row]);
1532+ gpio_write_pin_high(row_pins[row]);
1533 }
1534
1535 // Initialize the peripherals pins
1536@@ -123,11 +123,11 @@ int ec_init(void) {
1537 adc_read(adcMux);
1538
1539 // Initialize discharge pin as discharge mode
1540- writePinLow(DISCHARGE_PIN);
1541+ gpio_write_pin_low(DISCHARGE_PIN);
1542 #ifdef OPEN_DRAIN_SUPPORT
1543- setPinOutputOpenDrain(DISCHARGE_PIN);
1544+ gpio_set_pin_output_open_drain(DISCHARGE_PIN);
1545 #else
1546- setPinOutput(DISCHARGE_PIN);
1547+ gpio_set_pin_output(DISCHARGE_PIN);
1548 #endif
1549
1550 // Initialize drive lines
1551@@ -212,7 +212,7 @@ uint16_t ec_readkey_raw(uint8_t channel, uint8_t row, uint8_t col) {
1552 select_amux_channel(channel, col);
1553
1554 // Set the row pin to low state to avoid ghosting
1555- writePinLow(row_pins[row]);
1556+ gpio_write_pin_low(row_pins[row]);
1557
1558diff --git a/keyboards/clueboard/2x1800/2019/2019.c b/keyboards/clueboard/2x1800/2019/2019.c
1559index 40032cd66975d40b3974098c89e40e1371313741..8b0ba6a71e16629dc7b90391e9c4f5e044139156 100644
1560--- a/keyboards/clueboard/2x1800/2019/2019.c
1561+++ b/keyboards/clueboard/2x1800/2019/2019.c
1562@@ -17,14 +17,14 @@
1563
1564 void matrix_init_kb(void) {
1565 // Set our LED pins as output
1566- setPinOutput(D6);
1567- setPinOutput(B4);
1568- setPinOutput(B5);
1569- setPinOutput(B6);
1570+ gpio_set_pin_output(D6);
1571+ gpio_set_pin_output(B4);
1572+ gpio_set_pin_output(B5);
1573+ gpio_set_pin_output(B6);
1574
1575 // Set our Tilt Sensor pins as input
1576- setPinInputHigh(SHAKE_PIN_A);
1577- setPinInputHigh(SHAKE_PIN_B);
1578+ gpio_set_pin_input_high(SHAKE_PIN_A);
1579+ gpio_set_pin_input_high(SHAKE_PIN_B);
1580
1581 // Run the keymap level init
1582 matrix_init_user();
1583@@ -43,12 +43,12 @@ void check_encoder_buttons(void) {
1584 if (drawing_mode) {
1585 dprintf("Turning drawing mode off.\n");
1586 drawing_mode = false;
1587- writePinLow(D6);
1588+ gpio_write_pin_low(D6);
1589 unregister_code(KC_BTN1);
1590 } else {
1591 dprintf("Turning drawing mode on.\n");
1592 drawing_mode = true;
1593- writePinHigh(D6);
1594+ gpio_write_pin_high(D6);
1595 register_code(KC_BTN1);
1596 }
1597 }
1598@@ -65,7 +65,7 @@ void matrix_scan_kb(void) {
1599 #ifdef SHAKE_ENABLE
1600 // Read the current state of the tilt sensor. It is physically
1601 // impossible for both pins to register a low state at the same time.
1602- uint8_t tilt_read = (readPin(SHAKE_PIN_A) << 4) | readPin(SHAKE_PIN_B);
1603+ uint8_t tilt_read = (gpio_read_pin(SHAKE_PIN_A) << 4) | gpio_read_pin(SHAKE_PIN_B);
1604
1605 // Check to see if the tilt sensor has changed state since our last read
1606 if (tilt_state != tilt_read) {
1607@@ -136,9 +136,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
1608 bool led_update_kb(led_t led_state) {
1609 bool res = led_update_user(led_state);
1610 if(res) {
1611- writePin(B4, !led_state.num_lock);
1612- writePin(B5, !led_state.caps_lock);
1613- writePin(B6, !led_state.scroll_lock);
1614+ gpio_write_pin(B4, !led_state.num_lock);
1615+ gpio_write_pin(B5, !led_state.caps_lock);
1616+ gpio_write_pin(B6, !led_state.scroll_lock);
1617 }
1618
1619 return res;
1620diff --git a/keyboards/clueboard/2x1800/2021/max7219.c b/keyboards/clueboard/2x1800/2021/max7219.c
1621index 81d26b9a5181b4feaac189f7d9d0ce1ca7a842ca..849889a52e01766ed12a5241959639ed7b864384 100644
1622--- a/keyboards/clueboard/2x1800/2021/max7219.c
1623+++ b/keyboards/clueboard/2x1800/2021/max7219.c
1624@@ -206,8 +206,8 @@ void max7219_init(void) {
1625 wait_ms(1500);
1626 dprintf("max7219_init()\n");
1627
1628- setPinOutput(MAX7219_LOAD);
1629- writePinHigh(MAX7219_LOAD);
1630+ gpio_set_pin_output(MAX7219_LOAD);
1631+ gpio_write_pin_high(MAX7219_LOAD);
1632 spi_init();
1633
1634 for (int i=0; i<MAX7219_CONTROLLERS; i++) {