diff options
| author | Ryan <fauxpark@gmail.com> | 2021-09-04 02:09:30 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-03 17:09:30 +0100 |
| commit | 8574bf20d35b21c7b44ba8550fa11b4d100fdbbd (patch) | |
| tree | d2492bc01a53343a1f86e7f49d85726686e3f6f1 /keyboards/lfkeyboards | |
| parent | a01057d19dfa208fcf5c7cd16689257cb41ac79b (diff) | |
| download | qmk_firmware-8574bf20d35b21c7b44ba8550fa11b4d100fdbbd.tar.gz qmk_firmware-8574bf20d35b21c7b44ba8550fa11b4d100fdbbd.zip | |
Remove more cruft in keyboard files (#14288)
Diffstat (limited to 'keyboards/lfkeyboards')
| -rw-r--r-- | keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h | 15 | ||||
| -rw-r--r-- | keyboards/lfkeyboards/lfk87/lfk87.c | 4 | ||||
| -rw-r--r-- | keyboards/lfkeyboards/lfk87/lfk87.h | 14 | ||||
| -rw-r--r-- | keyboards/lfkeyboards/mini1800/mini1800.c | 4 | ||||
| -rw-r--r-- | keyboards/lfkeyboards/mini1800/mini1800.h | 14 | ||||
| -rw-r--r-- | keyboards/lfkeyboards/smk65/revb/revb.c | 8 | ||||
| -rw-r--r-- | keyboards/lfkeyboards/smk65/revb/revb.h | 16 |
7 files changed, 8 insertions, 67 deletions
diff --git a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h index 53860ea2b..325645165 100644 --- a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h +++ b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h | |||
| @@ -1,26 +1,11 @@ | |||
| 1 | #ifndef LFK65_HS_H | 1 | #ifndef LFK65_HS_H |
| 2 | #define LFK65_HS_H | 2 | #define LFK65_HS_H |
| 3 | 3 | ||
| 4 | /* if the kb.h file exists (because we're running from qmkbuilder) include it */ | ||
| 5 | #ifdef __has_include | ||
| 6 | #if __has_include("kb.h") | ||
| 7 | #include "kb.h" | ||
| 8 | #endif | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #include "quantum.h" | 4 | #include "quantum.h" |
| 12 | #include "matrix.h" | 5 | #include "matrix.h" |
| 13 | #include <avr/sfr_defs.h> | 6 | #include <avr/sfr_defs.h> |
| 14 | #include <stdint.h> | 7 | #include <stdint.h> |
| 15 | 8 | ||
| 16 | #ifndef cbi | ||
| 17 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | ||
| 18 | #endif | ||
| 19 | |||
| 20 | #ifndef sbi | ||
| 21 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) | ||
| 22 | #endif | ||
| 23 | |||
| 24 | void reset_keyboard_kb(void); | 9 | void reset_keyboard_kb(void); |
| 25 | 10 | ||
| 26 | // readability | 11 | // readability |
diff --git a/keyboards/lfkeyboards/lfk87/lfk87.c b/keyboards/lfkeyboards/lfk87/lfk87.c index 4b34fcef7..10fc14a8a 100644 --- a/keyboards/lfkeyboards/lfk87/lfk87.c +++ b/keyboards/lfkeyboards/lfk87/lfk87.c | |||
| @@ -32,8 +32,8 @@ void matrix_init_kb(void) | |||
| 32 | set_rgb(32, 0xFF, 0x00, 0x00); // Layer indicator, start red | 32 | set_rgb(32, 0xFF, 0x00, 0x00); // Layer indicator, start red |
| 33 | #ifndef AUDIO_ENABLE | 33 | #ifndef AUDIO_ENABLE |
| 34 | // If we're not using the audio pin, drive it low | 34 | // If we're not using the audio pin, drive it low |
| 35 | sbi(DDRC, 6); | 35 | setPinOutput(C6); |
| 36 | cbi(PORTC, 6); | 36 | writePinLow(C6); |
| 37 | #endif | 37 | #endif |
| 38 | #ifdef ISSI_ENABLE | 38 | #ifdef ISSI_ENABLE |
| 39 | issi_init(); | 39 | issi_init(); |
diff --git a/keyboards/lfkeyboards/lfk87/lfk87.h b/keyboards/lfkeyboards/lfk87/lfk87.h index 1a2f9fbaf..5c1fba6ba 100644 --- a/keyboards/lfkeyboards/lfk87/lfk87.h +++ b/keyboards/lfkeyboards/lfk87/lfk87.h | |||
| @@ -1,24 +1,10 @@ | |||
| 1 | #ifndef LFK87_H | 1 | #ifndef LFK87_H |
| 2 | #define LFK87_H | 2 | #define LFK87_H |
| 3 | 3 | ||
| 4 | /* if the kb.h file exists (because we're running from qmkbuilder) include it */ | ||
| 5 | #if __has_include("kb.h") | ||
| 6 | #include "kb.h" | ||
| 7 | #endif | ||
| 8 | |||
| 9 | #include "quantum.h" | 4 | #include "quantum.h" |
| 10 | #include "matrix.h" | 5 | #include "matrix.h" |
| 11 | #include <avr/sfr_defs.h> | 6 | #include <avr/sfr_defs.h> |
| 12 | 7 | ||
| 13 | #ifndef cbi | ||
| 14 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | ||
| 15 | #endif | ||
| 16 | |||
| 17 | #ifndef sbi | ||
| 18 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) | ||
| 19 | #endif | ||
| 20 | |||
| 21 | |||
| 22 | typedef struct RGB_Color { | 8 | typedef struct RGB_Color { |
| 23 | uint16_t red; | 9 | uint16_t red; |
| 24 | uint16_t green; | 10 | uint16_t green; |
diff --git a/keyboards/lfkeyboards/mini1800/mini1800.c b/keyboards/lfkeyboards/mini1800/mini1800.c index d5f4193c1..4c897ac69 100644 --- a/keyboards/lfkeyboards/mini1800/mini1800.c +++ b/keyboards/lfkeyboards/mini1800/mini1800.c | |||
| @@ -37,8 +37,8 @@ void matrix_init_kb(void) | |||
| 37 | set_rgb(32, 0xFF, 0x00, 0x00); // Layer indicator, start red | 37 | set_rgb(32, 0xFF, 0x00, 0x00); // Layer indicator, start red |
| 38 | #ifndef AUDIO_ENABLE | 38 | #ifndef AUDIO_ENABLE |
| 39 | // If we're not using the audio pin, drive it low | 39 | // If we're not using the audio pin, drive it low |
| 40 | sbi(DDRC, 6); | 40 | setPinOutput(C6); |
| 41 | cbi(PORTC, 6); | 41 | writePinLow(C6); |
| 42 | #endif | 42 | #endif |
| 43 | _delay_ms(500); | 43 | _delay_ms(500); |
| 44 | #ifdef ISSI_ENABLE | 44 | #ifdef ISSI_ENABLE |
diff --git a/keyboards/lfkeyboards/mini1800/mini1800.h b/keyboards/lfkeyboards/mini1800/mini1800.h index 17f7da348..c007d7f76 100644 --- a/keyboards/lfkeyboards/mini1800/mini1800.h +++ b/keyboards/lfkeyboards/mini1800/mini1800.h | |||
| @@ -1,24 +1,10 @@ | |||
| 1 | #ifndef LFK87_H | 1 | #ifndef LFK87_H |
| 2 | #define LFK87_H | 2 | #define LFK87_H |
| 3 | 3 | ||
| 4 | /* if the kb.h file exists (because we're running from qmkbuilder) include it */ | ||
| 5 | #if __has_include("kb.h") | ||
| 6 | #include "kb.h" | ||
| 7 | #endif | ||
| 8 | |||
| 9 | #include "quantum.h" | 4 | #include "quantum.h" |
| 10 | #include "matrix.h" | 5 | #include "matrix.h" |
| 11 | #include <avr/sfr_defs.h> | 6 | #include <avr/sfr_defs.h> |
| 12 | 7 | ||
| 13 | #ifndef cbi | ||
| 14 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | ||
| 15 | #endif | ||
| 16 | |||
| 17 | #ifndef sbi | ||
| 18 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) | ||
| 19 | #endif | ||
| 20 | |||
| 21 | |||
| 22 | typedef struct RGB_Color { | 8 | typedef struct RGB_Color { |
| 23 | uint16_t red; | 9 | uint16_t red; |
| 24 | uint16_t green; | 10 | uint16_t green; |
diff --git a/keyboards/lfkeyboards/smk65/revb/revb.c b/keyboards/lfkeyboards/smk65/revb/revb.c index 7498febeb..01c339f06 100644 --- a/keyboards/lfkeyboards/smk65/revb/revb.c +++ b/keyboards/lfkeyboards/smk65/revb/revb.c | |||
| @@ -34,12 +34,12 @@ void matrix_init_kb(void) | |||
| 34 | #ifdef AUDIO_ENABLE | 34 | #ifdef AUDIO_ENABLE |
| 35 | // audio_init() sets PB5 to output and drives it low, which breaks our matrix | 35 | // audio_init() sets PB5 to output and drives it low, which breaks our matrix |
| 36 | // so reset PB5 to input | 36 | // so reset PB5 to input |
| 37 | cbi(DDRB, 5); | 37 | setPinInput(B5); |
| 38 | sbi(PORTB, 5); | 38 | writePinHigh(B5); |
| 39 | #else | 39 | #else |
| 40 | // If we're not using the audio pin, drive it low | 40 | // If we're not using the audio pin, drive it low |
| 41 | sbi(DDRC, 6); | 41 | setPinOutput(C6); |
| 42 | cbi(PORTC, 6); | 42 | writePinLow(C6); |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | #ifdef ISSI_ENABLE | 45 | #ifdef ISSI_ENABLE |
diff --git a/keyboards/lfkeyboards/smk65/revb/revb.h b/keyboards/lfkeyboards/smk65/revb/revb.h index 3d3e5181f..dbb25b869 100644 --- a/keyboards/lfkeyboards/smk65/revb/revb.h +++ b/keyboards/lfkeyboards/smk65/revb/revb.h | |||
| @@ -14,26 +14,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 14 | 14 | ||
| 15 | #pragma once | 15 | #pragma once |
| 16 | 16 | ||
| 17 | /* if the kb.h file exists (because we're running from qmkbuilder) include it */ | ||
| 18 | #ifdef __has_include | ||
| 19 | #if __has_include("kb.h") | ||
| 20 | #include "kb.h" | ||
| 21 | #endif | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #include "quantum.h" | 17 | #include "quantum.h" |
| 25 | #include "matrix.h" | 18 | #include "matrix.h" |
| 26 | #include <avr/sfr_defs.h> | 19 | #include <avr/sfr_defs.h> |
| 27 | 20 | ||
| 28 | #ifndef cbi | ||
| 29 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifndef sbi | ||
| 33 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) | ||
| 34 | #endif | ||
| 35 | |||
| 36 | |||
| 37 | typedef struct RGB_Color { | 21 | typedef struct RGB_Color { |
| 38 | uint16_t red; | 22 | uint16_t red; |
| 39 | uint16_t green; | 23 | uint16_t green; |
