From 41c50bb653b840c595fb31541729d892f68666e6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 1 Sep 2021 19:03:14 +1000 Subject: Change keyboard level include guards to `pragma once` (#14248) * Change keyboard level include guards to `pragma once` And clean up a lot of layout macros * Oops * Remove dangling endif --- keyboards/kinesis/alvicstep/alvicstep.h | 135 +++++++++++++++----------------- keyboards/kinesis/alvicstep/config.h | 6 +- 2 files changed, 66 insertions(+), 75 deletions(-) (limited to 'keyboards/kinesis/alvicstep') diff --git a/keyboards/kinesis/alvicstep/alvicstep.h b/keyboards/kinesis/alvicstep/alvicstep.h index 169012faf5..053698770a 100644 --- a/keyboards/kinesis/alvicstep/alvicstep.h +++ b/keyboards/kinesis/alvicstep/alvicstep.h @@ -1,80 +1,77 @@ -#ifndef KINESIS_ALVICSTEP_H -#define KINESIS_ALVICSTEP_H +#pragma once #include "../kinesis.h" #define ___ KC_NO -#define LAYOUT( \ - k02, k22, k12, k01, k21, k11, k00, k20, k10, \ - k80, k70, k60, k50, k40, k30, \ - k81, k71, k61, k51, k41, k31, \ - k82, k72, k62, k52, k42, k32, \ - k83, k73, k63, k53, k43, k33, \ - k74, k64, k54, k34, \ - k36, k35, \ - k55, \ - k56, k46, k75, \ - \ - k03, k23, k13, k04, k24, k14, k05, k85, k84, \ - k94, kA4, kB4, kD4, kE4, kF4, \ - k95, kA5, kB5, kD5, kE5, kF5, \ - k96, kA6, kB6, kD6, kE6, kF6, \ - k97, kA7, kB7, kD7, kE7, kF7, \ - k93, kB3, kD3, kE3, \ - k47, k66, \ - k67, \ - k87, k76, k86 \ -) { \ - { k00, k01, k02, k03, k04, k05, ___, ___ }, \ - { k10, k11, k12, k13, k14, ___, ___, ___ }, \ - { k20, k21, k22, k23, k24, ___, ___, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36, ___ }, \ - { k40, k41, k42, k43, ___, ___, k46, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, ___ }, \ - { k60, k61, k62, k63, k64, ___, k66, k67 }, \ - { k70, k71, k72, k73, k74, k75, k76, ___ }, \ - { k80, k81, k82, k83, k84, k85, k86, k87 }, \ - { ___, ___, ___, k93, k94, k95, k96, k97 }, \ - { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ - { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ - { ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ - { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ - { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ +#define LAYOUT( \ + k02, k22, k12, k01, k21, k11, k00, k20, k10, \ + k80, k70, k60, k50, k40, k30, \ + k81, k71, k61, k51, k41, k31, \ + k82, k72, k62, k52, k42, k32, \ + k83, k73, k63, k53, k43, k33, \ + k74, k64, k54, k34, \ + k36, k35, \ + k55, \ + k56, k46, k75, \ +\ + k03, k23, k13, k04, k24, k14, k05, k85, k84, \ + k94, kA4, kB4, kD4, kE4, kF4, \ + k95, kA5, kB5, kD5, kE5, kF5, \ + k96, kA6, kB6, kD6, kE6, kF6, \ + k97, kA7, kB7, kD7, kE7, kF7, \ + k93, kB3, kD3, kE3, \ + k47, k66, \ + k67, \ + k87, k76, k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___, ___ }, \ + { k20, k21, k22, k23, k24, ___, ___, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, ___ }, \ + { k60, k61, k62, k63, k64, ___, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { ___, ___, ___, k93, k94, k95, k96, k97 }, \ + { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ + { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ + { ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ + { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ + { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ } -/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ -#define LAYOUT_pretty( \ - k02, k22, k12, k01, k21, k11, k00, k20, k10, k03, k23, k13, k04, k24, k14, k05, k85, k84, \ - k80, k70, k60, k50, k40, k30, k94, kA4, kB4, kD4, kE4, kF4, \ - k81, k71, k61, k51, k41, k31, k95, kA5, kB5, kD5, kE5, kF5, \ - k82, k72, k62, k52, k42, k32, k96, kA6, kB6, kD6, kE6, kF6, \ - k83, k73, k63, k53, k43, k33, k97, kA7, kB7, kD7, kE7, kF7, \ - k74, k64, k54, k34, k93, kB3, kD3, kE3, \ - k36, k35, k47, k66, \ - k55, k67, \ - k56, k46, k75, k87, k76, k86 \ -) { \ - { k00, k01, k02, k03, k04, k05, ___, ___ }, \ - { k10, k11, k12, k13, k14, ___, ___, ___ }, \ - { k20, k21, k22, k23, k24, ___, ___, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36, ___ }, \ - { k40, k41, k42, k43, ___, ___, k46, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, ___ }, \ - { k60, k61, k62, k63, k64, ___, k66, k67 }, \ - { k70, k71, k72, k73, k74, k75, k76, ___ }, \ - { k80, k81, k82, k83, k84, k85, k86, k87 }, \ - { ___, ___, ___, k93, k94, k95, k96, k97 }, \ - { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ - { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ - { ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ - { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ - { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ +#define LAYOUT_pretty( \ + k02, k22, k12, k01, k21, k11, k00, k20, k10, k03, k23, k13, k04, k24, k14, k05, k85, k84, \ + k80, k70, k60, k50, k40, k30, k94, kA4, kB4, kD4, kE4, kF4, \ + k81, k71, k61, k51, k41, k31, k95, kA5, kB5, kD5, kE5, kF5, \ + k82, k72, k62, k52, k42, k32, k96, kA6, kB6, kD6, kE6, kF6, \ + k83, k73, k63, k53, k43, k33, k97, kA7, kB7, kD7, kE7, kF7, \ + k74, k64, k54, k34, k93, kB3, kD3, kE3, \ + k36, k35, k47, k66, \ + k55, k67, \ + k56, k46, k75, k87, k76, k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___, ___ }, \ + { k20, k21, k22, k23, k24, ___, ___, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, ___ }, \ + { k60, k61, k62, k63, k64, ___, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { ___, ___, ___, k93, k94, k95, k96, k97 }, \ + { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ + { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ + { ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ + { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ + { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ } - /* Row pin configuration @@ -97,5 +94,3 @@ PB6 col6 | | | | LCtrl | Delete | Bksp | RCtrl | Enter | Space | H | J | K | | L | ;: | '" PB7 col7 | | | | | RGUI | | PageUp | | PageDn | N | M | ,< | | .> | /? | RShift */ - -#endif diff --git a/keyboards/kinesis/alvicstep/config.h b/keyboards/kinesis/alvicstep/config.h index 02c7725cec..8a656264ee 100644 --- a/keyboards/kinesis/alvicstep/config.h +++ b/keyboards/kinesis/alvicstep/config.h @@ -1,5 +1,4 @@ -#ifndef ALVICSTEP_CONFIG_H -#define ALVICSTEP_CONFIG_H +#pragma once #include "../config.h" #include "config_common.h" @@ -31,6 +30,3 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - - -#endif -- cgit v1.2.1 From c1297ceb972d45407cc1f518fd0527efda7ee796 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Mon, 29 Nov 2021 17:22:10 +0100 Subject: [Core] Remove matrix_is_modified() and debounce_is_active() (#15349) --- keyboards/kinesis/alvicstep/matrix.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'keyboards/kinesis/alvicstep') diff --git a/keyboards/kinesis/alvicstep/matrix.c b/keyboards/kinesis/alvicstep/matrix.c index 71619f8167..9c05374510 100644 --- a/keyboards/kinesis/alvicstep/matrix.c +++ b/keyboards/kinesis/alvicstep/matrix.c @@ -136,12 +136,6 @@ uint8_t matrix_scan(void) return 1; } -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - inline bool matrix_is_on(uint8_t row, uint8_t col) { -- cgit v1.2.1 From bd70f5261cbb7fd4700bf9876da94c9661dadf63 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 10 Mar 2022 23:18:07 +1100 Subject: Remove `matrix_key_count()` (#16603) * Remove `matrix_key_count()` * Remove `matrix_bitpop()` --- keyboards/kinesis/alvicstep/matrix.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'keyboards/kinesis/alvicstep') diff --git a/keyboards/kinesis/alvicstep/matrix.c b/keyboards/kinesis/alvicstep/matrix.c index 9c05374510..5636418849 100644 --- a/keyboards/kinesis/alvicstep/matrix.c +++ b/keyboards/kinesis/alvicstep/matrix.c @@ -158,15 +158,6 @@ void matrix_print(void) } } -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; -} - static matrix_row_t read_row(uint8_t row) { _delay_us(30); // without this wait read unstable value. -- cgit v1.2.1