diff options
-rw-r--r-- | keyboards/cu75/cu75.c | 8 | ||||
-rw-r--r-- | keyboards/cu75/cu75.h | 16 | ||||
-rw-r--r-- | keyboards/ergotaco/ergotaco.h | 2 | ||||
-rw-r--r-- | keyboards/georgi/georgi.h | 2 | ||||
-rw-r--r-- | keyboards/gergo/gergo.h | 2 | ||||
-rw-r--r-- | keyboards/handwired/dactyl/dactyl.h | 3 | ||||
-rw-r--r-- | keyboards/handwired/frenchdev/frenchdev.h | 3 | ||||
-rw-r--r-- | keyboards/hotdox/hotdox.h | 3 | ||||
-rw-r--r-- | keyboards/ktec/ergodone/ergodone.h | 3 | ||||
-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 | ||||
-rwxr-xr-x | keyboards/sx60/sx60.h | 3 |
17 files changed, 12 insertions, 108 deletions
diff --git a/keyboards/cu75/cu75.c b/keyboards/cu75/cu75.c index 80941df39..43600efad 100644 --- a/keyboards/cu75/cu75.c +++ b/keyboards/cu75/cu75.c | |||
@@ -28,12 +28,12 @@ void matrix_init_kb(void) | |||
28 | audio_init(); | 28 | audio_init(); |
29 | PLAY_SONG(test_sound); | 29 | PLAY_SONG(test_sound); |
30 | // Fix port B5 | 30 | // Fix port B5 |
31 | cbi(DDRB, 5); | 31 | setPinInput(B5); |
32 | sbi(PORTB, 5); | 32 | writePinHigh(B5); |
33 | #else | 33 | #else |
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/cu75/cu75.h b/keyboards/cu75/cu75.h index 5abce8fcd..7774187b4 100644 --- a/keyboards/cu75/cu75.h +++ b/keyboards/cu75/cu75.h | |||
@@ -1,26 +1,10 @@ | |||
1 | #ifndef CU75_H | 1 | #ifndef CU75_H |
2 | #define CU75_H | 2 | #define CU75_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 | 7 | ||
15 | #ifndef cbi | ||
16 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | ||
17 | #endif | ||
18 | |||
19 | #ifndef sbi | ||
20 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) | ||
21 | #endif | ||
22 | |||
23 | |||
24 | typedef struct RGB_Color { | 8 | typedef struct RGB_Color { |
25 | uint16_t red; | 9 | uint16_t red; |
26 | uint16_t green; | 10 | uint16_t green; |
diff --git a/keyboards/ergotaco/ergotaco.h b/keyboards/ergotaco/ergotaco.h index 6bc5ce36f..5a0cd5e8f 100644 --- a/keyboards/ergotaco/ergotaco.h +++ b/keyboards/ergotaco/ergotaco.h | |||
@@ -9,8 +9,6 @@ | |||
9 | 9 | ||
10 | extern i2c_status_t mcp23018_status; | 10 | extern i2c_status_t mcp23018_status; |
11 | #define ERGODOX_EZ_I2C_TIMEOUT 1000 | 11 | #define ERGODOX_EZ_I2C_TIMEOUT 1000 |
12 | #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | ||
13 | #define CPU_16MHz 0x00 | ||
14 | 12 | ||
15 | // I2C aliases and register addresses (see "mcp23018.md") | 13 | // I2C aliases and register addresses (see "mcp23018.md") |
16 | //#define I2C_ADDR 0b0100000 | 14 | //#define I2C_ADDR 0b0100000 |
diff --git a/keyboards/georgi/georgi.h b/keyboards/georgi/georgi.h index df6bb6ea9..e5a52c585 100644 --- a/keyboards/georgi/georgi.h +++ b/keyboards/georgi/georgi.h | |||
@@ -9,8 +9,6 @@ | |||
9 | 9 | ||
10 | extern i2c_status_t mcp23018_status; | 10 | extern i2c_status_t mcp23018_status; |
11 | #define ERGODOX_EZ_I2C_TIMEOUT 1000 | 11 | #define ERGODOX_EZ_I2C_TIMEOUT 1000 |
12 | #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | ||
13 | #define CPU_16MHz 0x00 | ||
14 | 12 | ||
15 | // I2C aliases and register addresses (see "mcp23018.md") | 13 | // I2C aliases and register addresses (see "mcp23018.md") |
16 | //#define I2C_ADDR 0b0100000 | 14 | //#define I2C_ADDR 0b0100000 |
diff --git a/keyboards/gergo/gergo.h b/keyboards/gergo/gergo.h index 1370325f2..517454266 100644 --- a/keyboards/gergo/gergo.h +++ b/keyboards/gergo/gergo.h | |||
@@ -9,8 +9,6 @@ | |||
9 | 9 | ||
10 | extern i2c_status_t mcp23018_status; | 10 | extern i2c_status_t mcp23018_status; |
11 | #define I2C_TIMEOUT 1000 | 11 | #define I2C_TIMEOUT 1000 |
12 | #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | ||
13 | #define CPU_16MHz 0x00 | ||
14 | 12 | ||
15 | // I2C aliases and register addresses (see "mcp23018.md") | 13 | // I2C aliases and register addresses (see "mcp23018.md") |
16 | //#define I2C_ADDR 0b0100000 | 14 | //#define I2C_ADDR 0b0100000 |
diff --git a/keyboards/handwired/dactyl/dactyl.h b/keyboards/handwired/dactyl/dactyl.h index d4c38dcfb..3589e1d3c 100644 --- a/keyboards/handwired/dactyl/dactyl.h +++ b/keyboards/handwired/dactyl/dactyl.h | |||
@@ -7,9 +7,6 @@ | |||
7 | #include "i2cmaster.h" | 7 | #include "i2cmaster.h" |
8 | #include <util/delay.h> | 8 | #include <util/delay.h> |
9 | 9 | ||
10 | #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | ||
11 | #define CPU_16MHz 0x00 | ||
12 | |||
13 | #define I2C_ADDR 0b0100000 | 10 | #define I2C_ADDR 0b0100000 |
14 | #define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) | 11 | #define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) |
15 | #define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) | 12 | #define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) |
diff --git a/keyboards/handwired/frenchdev/frenchdev.h b/keyboards/handwired/frenchdev/frenchdev.h index 1df399088..d608fe9f0 100644 --- a/keyboards/handwired/frenchdev/frenchdev.h +++ b/keyboards/handwired/frenchdev/frenchdev.h | |||
@@ -6,9 +6,6 @@ | |||
6 | #include "i2c_master.h" | 6 | #include "i2c_master.h" |
7 | #include <util/delay.h> | 7 | #include <util/delay.h> |
8 | 8 | ||
9 | #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | ||
10 | #define CPU_16MHz 0x00 | ||
11 | |||
12 | // I2C aliases and register addresses (see "mcp23018.md" on tmk repository) | 9 | // I2C aliases and register addresses (see "mcp23018.md" on tmk repository) |
13 | #define I2C_ADDR 0b0100000 | 10 | #define I2C_ADDR 0b0100000 |
14 | #define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) | 11 | #define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) |
diff --git a/keyboards/hotdox/hotdox.h b/keyboards/hotdox/hotdox.h index 0eef4ea79..348ec6b29 100644 --- a/keyboards/hotdox/hotdox.h +++ b/keyboards/hotdox/hotdox.h | |||
@@ -4,9 +4,6 @@ | |||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | #include <stdbool.h> | 5 | #include <stdbool.h> |
6 | 6 | ||
7 | #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | ||
8 | #define CPU_16MHz 0x00 | ||
9 | |||
10 | void init_ergodox(void); | 7 | void init_ergodox(void); |
11 | 8 | ||
12 | inline void ergodox_board_led_on(void) { DDRB |= (1<<PB7); PORTB |= (1<<PB7); } | 9 | inline void ergodox_board_led_on(void) { DDRB |= (1<<PB7); PORTB |= (1<<PB7); } |
diff --git a/keyboards/ktec/ergodone/ergodone.h b/keyboards/ktec/ergodone/ergodone.h index f88280fa2..89edb8a0b 100644 --- a/keyboards/ktec/ergodone/ergodone.h +++ b/keyboards/ktec/ergodone/ergodone.h | |||
@@ -5,9 +5,6 @@ | |||
5 | #include <stdint.h> | 5 | #include <stdint.h> |
6 | #include <stdbool.h> | 6 | #include <stdbool.h> |
7 | 7 | ||
8 | #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | ||
9 | #define CPU_16MHz 0x00 | ||
10 | |||
11 | void init_ergodox(void); | 8 | void init_ergodox(void); |
12 | 9 | ||
13 | inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<PB5); PORTB &= ~(1<<PB5); } | 10 | inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<PB5); PORTB &= ~(1<<PB5); } |
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; |
diff --git a/keyboards/sx60/sx60.h b/keyboards/sx60/sx60.h index e5a68ef2f..8ead53ee0 100755 --- a/keyboards/sx60/sx60.h +++ b/keyboards/sx60/sx60.h | |||
@@ -7,9 +7,6 @@ | |||
7 | #include "i2cmaster.h" | 7 | #include "i2cmaster.h" |
8 | #include <util/delay.h> | 8 | #include <util/delay.h> |
9 | 9 | ||
10 | #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | ||
11 | #define CPU_16MHz 0x00 | ||
12 | |||
13 | /* I2C aliases and register addresses (see "mcp23018.md") */ | 10 | /* I2C aliases and register addresses (see "mcp23018.md") */ |
14 | #define I2C_ADDR 0b0100000 | 11 | #define I2C_ADDR 0b0100000 |
15 | #define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) | 12 | #define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) |