diff options
author | Wilba <Jason.S.Williams@gmail.com> | 2019-10-12 15:37:03 +1100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-10-11 21:37:03 -0700 |
commit | e47ab6a5752e16bd3b4288153798c12af1bee3d5 (patch) | |
tree | 47fd56bfb7be699cc6b1ca84c3c22b8804000f5c | |
parent | 22aa2ce6b2f3bda51aca84d8f707c17f0301ff3b (diff) | |
download | qmk_firmware-e47ab6a5752e16bd3b4288153798c12af1bee3d5.tar.gz qmk_firmware-e47ab6a5752e16bd3b4288153798c12af1bee3d5.zip |
[Keyboard] wilba.tech PCB refactoring (#6982)
* Cleanup
* Refactor VIA rules.mk
* WT mono backlight refactor, VIA support
* Added WT75-C
* Fixed compile error
* Cleanup rules.mk
* Review changes
* Review changes
48 files changed, 1132 insertions, 1250 deletions
diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h index d8c256c7d..2a3589730 100644 --- a/keyboards/aeboards/aegis/config.h +++ b/keyboards/aeboards/aegis/config.h | |||
@@ -47,8 +47,6 @@ | |||
47 | /* Locking resynchronize hack */ | 47 | /* Locking resynchronize hack */ |
48 | #define LOCKING_RESYNC_ENABLE | 48 | #define LOCKING_RESYNC_ENABLE |
49 | 49 | ||
50 | //#define WT_MONO_BACKLIGHT | ||
51 | |||
52 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 50 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
53 | 51 | ||
54 | // EEPROM usage | 52 | // EEPROM usage |
diff --git a/keyboards/aeboards/ext65/config.h b/keyboards/aeboards/ext65/config.h index b3e1b8c2f..7255b463f 100644 --- a/keyboards/aeboards/ext65/config.h +++ b/keyboards/aeboards/ext65/config.h | |||
@@ -47,8 +47,6 @@ | |||
47 | /* Locking resynchronize hack */ | 47 | /* Locking resynchronize hack */ |
48 | #define LOCKING_RESYNC_ENABLE | 48 | #define LOCKING_RESYNC_ENABLE |
49 | 49 | ||
50 | //#define WT_MONO_BACKLIGHT | ||
51 | |||
52 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 50 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
53 | 51 | ||
54 | // EEPROM usage | 52 | // EEPROM usage |
diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index cd32a3d8c..a4ab9d5e2 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h | |||
@@ -48,9 +48,6 @@ | |||
48 | #define RGBLIGHT_VAL_STEP 8 | 48 | #define RGBLIGHT_VAL_STEP 8 |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | // Does not use WT_MONO_BACKLIGHT | ||
52 | // #define WT_MONO_BACKLIGHT | ||
53 | |||
54 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 51 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
55 | 52 | ||
56 | // EEPROM usage | 53 | // EEPROM usage |
diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index 983960224..ebcb6a455 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rules.mk +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk | |||
@@ -1,5 +1,3 @@ | |||
1 | |||
2 | |||
3 | # project specific files | 1 | # project specific files |
4 | SRC = keyboards/wilba_tech/wt_main.c \ | 2 | SRC = keyboards/wilba_tech/wt_main.c \ |
5 | keyboards/wilba_tech/wt_rgb_backlight.c \ | 3 | keyboards/wilba_tech/wt_rgb_backlight.c \ |
@@ -10,42 +8,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ | |||
10 | # MCU name | 8 | # MCU name |
11 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
12 | 10 | ||
13 | # Processor frequency. | 11 | # Bootloader selection |
14 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
15 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
16 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
17 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
18 | # | 16 | # QMK DFU qmk-dfu |
19 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
20 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
21 | # does not *change* the processor frequency - it should merely be updated to | ||
22 | # reflect the processor speed set externally so that the code can use accurate | ||
23 | # software delays. | ||
24 | F_CPU = 16000000 | ||
25 | |||
26 | # | ||
27 | # LUFA specific | ||
28 | # | ||
29 | # Target architecture (see library "Board Types" documentation). | ||
30 | ARCH = AVR8 | ||
31 | |||
32 | # Input clock frequency. | ||
33 | # This will define a symbol, F_USB, in all source code files equal to the | ||
34 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
35 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
36 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
37 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
38 | # at the end, this will be done automatically to create a 32-bit value in your | ||
39 | # source code. | ||
40 | # | ||
41 | # If no clock division is performed on the input clock inside the AVR (via the | ||
42 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
43 | F_USB = $(F_CPU) | ||
44 | |||
45 | # Interrupt driven control endpoint task(+60) | ||
46 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
47 | |||
48 | # Boot Section | ||
49 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
50 | 20 | ||
51 | # Do not put the microcontroller into power saving mode | 21 | # Do not put the microcontroller into power saving mode |
diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h index 6901309a0..f72ecae85 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/config.h | |||
@@ -181,8 +181,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
181 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 181 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
182 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 182 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
183 | 183 | ||
184 | //#define WT_MONO_BACKLIGHT | ||
185 | |||
186 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 184 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
187 | 185 | ||
188 | // EEPROM usage | 186 | // EEPROM usage |
diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk index 70258b9ea..99330021f 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_b/rules.mk | |||
@@ -4,44 +4,14 @@ SRC = keyboards/wilba_tech/wt_main.c | |||
4 | # MCU name | 4 | # MCU name |
5 | MCU = atmega32u4 | 5 | MCU = atmega32u4 |
6 | 6 | ||
7 | # Processor frequency. | 7 | # Bootloader selection |
8 | # This will define a symbol, F_CPU, in all source code files equal to the | 8 | # Teensy halfkay |
9 | # processor frequency in Hz. You can then use this symbol in your source code to | 9 | # Pro Micro caterina |
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 10 | # Atmel DFU atmel-dfu |
11 | # automatically to create a 32-bit value in your source code. | 11 | # LUFA DFU lufa-dfu |
12 | # | 12 | # QMK DFU qmk-dfu |
13 | # This will be an integer division of F_USB below, as it is sourced by | 13 | # ATmega32A bootloadHID |
14 | # F_USB after it has run through any CPU prescalers. Note that this value | 14 | # ATmega328P USBasp |
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | 15 | BOOTLOADER = atmel-dfu |
46 | 16 | ||
47 | 17 | ||
diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index 3b2287333..4ce5dc54c 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk | |||
@@ -10,42 +10,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ | |||
10 | # MCU name | 10 | # MCU name |
11 | MCU = atmega32u4 | 11 | MCU = atmega32u4 |
12 | 12 | ||
13 | # Processor frequency. | 13 | # Bootloader selection |
14 | # This will define a symbol, F_CPU, in all source code files equal to the | 14 | # Teensy halfkay |
15 | # processor frequency in Hz. You can then use this symbol in your source code to | 15 | # Pro Micro caterina |
16 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 16 | # Atmel DFU atmel-dfu |
17 | # automatically to create a 32-bit value in your source code. | 17 | # LUFA DFU lufa-dfu |
18 | # | 18 | # QMK DFU qmk-dfu |
19 | # This will be an integer division of F_USB below, as it is sourced by | 19 | # ATmega32A bootloadHID |
20 | # F_USB after it has run through any CPU prescalers. Note that this value | 20 | # ATmega328P USBasp |
21 | # does not *change* the processor frequency - it should merely be updated to | ||
22 | # reflect the processor speed set externally so that the code can use accurate | ||
23 | # software delays. | ||
24 | F_CPU = 16000000 | ||
25 | |||
26 | # | ||
27 | # LUFA specific | ||
28 | # | ||
29 | # Target architecture (see library "Board Types" documentation). | ||
30 | ARCH = AVR8 | ||
31 | |||
32 | # Input clock frequency. | ||
33 | # This will define a symbol, F_USB, in all source code files equal to the | ||
34 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
35 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
36 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
37 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
38 | # at the end, this will be done automatically to create a 32-bit value in your | ||
39 | # source code. | ||
40 | # | ||
41 | # If no clock division is performed on the input clock inside the AVR (via the | ||
42 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
43 | F_USB = $(F_CPU) | ||
44 | |||
45 | # Interrupt driven control endpoint task(+60) | ||
46 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
47 | |||
48 | # Boot Section | ||
49 | BOOTLOADER = atmel-dfu | 21 | BOOTLOADER = atmel-dfu |
50 | 22 | ||
51 | # Do not put the microcontroller into power saving mode | 23 | # Do not put the microcontroller into power saving mode |
diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk index 4270e7090..32f0e25de 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk | |||
@@ -4,43 +4,14 @@ SRC = keyboards/wilba_tech/wt_main.c | |||
4 | # MCU name | 4 | # MCU name |
5 | MCU = atmega32u4 | 5 | MCU = atmega32u4 |
6 | 6 | ||
7 | # Processor frequency. | 7 | # Bootloader selection |
8 | # This will define a symbol, F_CPU, in all source code files equal to the | 8 | # Teensy halfkay |
9 | # processor frequency in Hz. You can then use this symbol in your source code to | 9 | # Pro Micro caterina |
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 10 | # Atmel DFU atmel-dfu |
11 | # automatically to create a 32-bit value in your source code. | 11 | # LUFA DFU lufa-dfu |
12 | # | 12 | # QMK DFU qmk-dfu |
13 | # This will be an integer division of F_USB below, as it is sourced by | 13 | # ATmega32A bootloadHID |
14 | # F_USB after it has run through any CPU prescalers. Note that this value | 14 | # ATmega328P USBasp |
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | # Boot Section | ||
44 | BOOTLOADER = atmel-dfu | 15 | BOOTLOADER = atmel-dfu |
45 | 16 | ||
46 | # Do not put the microcontroller into power saving mode | 17 | # Do not put the microcontroller into power saving mode |
diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk index 6b7b3a63d..c016fa344 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk | |||
@@ -5,47 +5,17 @@ SRC = keyboards/wilba_tech/wt_main.c \ | |||
5 | drivers/issi/is31fl3218.c \ | 5 | drivers/issi/is31fl3218.c \ |
6 | drivers/avr/i2c_master.c | 6 | drivers/avr/i2c_master.c |
7 | 7 | ||
8 | |||
9 | # MCU name | 8 | # MCU name |
10 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
11 | 10 | ||
12 | # Processor frequency. | 11 | # Bootloader selection |
13 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
14 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
15 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
16 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
17 | # | 16 | # QMK DFU qmk-dfu |
18 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
19 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
20 | # does not *change* the processor frequency - it should merely be updated to | ||
21 | # reflect the processor speed set externally so that the code can use accurate | ||
22 | # software delays. | ||
23 | F_CPU = 16000000 | ||
24 | |||
25 | |||
26 | # | ||
27 | # LUFA specific | ||
28 | # | ||
29 | # Target architecture (see library "Board Types" documentation). | ||
30 | ARCH = AVR8 | ||
31 | |||
32 | # Input clock frequency. | ||
33 | # This will define a symbol, F_USB, in all source code files equal to the | ||
34 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
35 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
36 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
37 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
38 | # at the end, this will be done automatically to create a 32-bit value in your | ||
39 | # source code. | ||
40 | # | ||
41 | # If no clock division is performed on the input clock inside the AVR (via the | ||
42 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
43 | F_USB = $(F_CPU) | ||
44 | |||
45 | # Interrupt driven control endpoint task(+60) | ||
46 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
47 | |||
48 | # Boot Section | ||
49 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
50 | 20 | ||
51 | # Do not put the microcontroller into power saving mode | 21 | # Do not put the microcontroller into power saving mode |
diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index 348b124b9..d0bf0ed1e 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h | |||
@@ -179,8 +179,6 @@ | |||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | 181 | ||
182 | //#define WT_MONO_BACKLIGHT | ||
183 | |||
184 | // IS31FL3731 driver | 182 | // IS31FL3731 driver |
185 | #define DRIVER_COUNT 3 | 183 | #define DRIVER_COUNT 3 |
186 | #define DRIVER_LED_TOTAL 108 | 184 | #define DRIVER_LED_TOTAL 108 |
diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index 6079ad893..caecaecbb 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk | |||
@@ -8,44 +8,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ | |||
8 | # MCU name | 8 | # MCU name |
9 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
10 | 10 | ||
11 | # Processor frequency. | 11 | # Bootloader selection |
12 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
13 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
14 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
15 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
16 | # | 16 | # QMK DFU qmk-dfu |
17 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
18 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
19 | # does not *change* the processor frequency - it should merely be updated to | ||
20 | # reflect the processor speed set externally so that the code can use accurate | ||
21 | # software delays. | ||
22 | F_CPU = 16000000 | ||
23 | |||
24 | |||
25 | # | ||
26 | # LUFA specific | ||
27 | # | ||
28 | # Target architecture (see library "Board Types" documentation). | ||
29 | ARCH = AVR8 | ||
30 | |||
31 | # Input clock frequency. | ||
32 | # This will define a symbol, F_USB, in all source code files equal to the | ||
33 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
34 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
35 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
36 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
37 | # at the end, this will be done automatically to create a 32-bit value in your | ||
38 | # source code. | ||
39 | # | ||
40 | # If no clock division is performed on the input clock inside the AVR (via the | ||
41 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
42 | F_USB = $(F_CPU) | ||
43 | |||
44 | # Interrupt driven control endpoint task(+60) | ||
45 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
46 | |||
47 | |||
48 | # Boot Section | ||
49 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
50 | 20 | ||
51 | 21 | ||
diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 3ac8ea6fc..6e1e0e81c 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h | |||
@@ -179,14 +179,33 @@ | |||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | 181 | ||
182 | #define WT_MONO_BACKLIGHT | 182 | // enable the mono backlight |
183 | #define MONO_BACKLIGHT_ENABLED 1 | ||
184 | |||
185 | // enable the RGB indicator for WT75-A | ||
186 | #define MONO_BACKLIGHT_WT75_A | ||
187 | |||
188 | // disable backlight when USB suspended (PC sleep/hibernate/shutdown) | ||
189 | #define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 | ||
190 | |||
191 | // disable backlight after timeout in minutes, 0 = no timeout | ||
192 | #define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 | ||
193 | |||
194 | // the default brightness | ||
195 | #define MONO_BACKLIGHT_BRIGHTNESS 255 | ||
196 | |||
197 | // the default effect | ||
198 | #define MONO_BACKLIGHT_EFFECT 1 | ||
199 | |||
200 | // the default effect speed (0-3) | ||
201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | ||
183 | 202 | ||
184 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 203 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
185 | 204 | ||
186 | // EEPROM usage | 205 | // EEPROM usage |
187 | 206 | ||
188 | // TODO: refactor with new user EEPROM code (coming soon) | 207 | // TODO: refactor with new user EEPROM code (coming soon) |
189 | #define EEPROM_MAGIC 0x451F | 208 | #define EEPROM_MAGIC 0x4520 |
190 | #define EEPROM_MAGIC_ADDR 34 | 209 | #define EEPROM_MAGIC_ADDR 34 |
191 | // Bump this every time we change what we store | 210 | // Bump this every time we change what we store |
192 | // This will automatically reset the EEPROM with defaults | 211 | // This will automatically reset the EEPROM with defaults |
@@ -194,9 +213,11 @@ | |||
194 | #define EEPROM_VERSION 0x08 | 213 | #define EEPROM_VERSION 0x08 |
195 | #define EEPROM_VERSION_ADDR 36 | 214 | #define EEPROM_VERSION_ADDR 36 |
196 | 215 | ||
197 | // Dynamic keymap starts after EEPROM version | 216 | // Backlight config starts after EEPROM version |
198 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | 217 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 |
199 | // Dynamic macro starts after dynamic keymaps (37+(4*5*14*2)) = (37+560) | 218 | // Dynamic keymap starts after backlight config (37+7) |
200 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 597 | 219 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 |
201 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 427 | 220 | // Dynamic macro starts after dynamic keymaps (44+(4*5*14*2)) = (44+560) |
221 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 604 | ||
222 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 420 | ||
202 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | 223 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 |
diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk index 76a07d7a4..8834bf0c8 100644 --- a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk | |||
@@ -1,71 +1,2 @@ | |||
1 | # project specific files | ||
2 | SRC = drivers/issi/is31fl3736.c \ | ||
3 | drivers/avr/i2c_master.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | ||
5 | keyboards/wilba_tech/wt_main.c | ||
6 | |||
7 | # MCU name | ||
8 | MCU = atmega32u4 | ||
9 | |||
10 | # Processor frequency. | ||
11 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
12 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
14 | # automatically to create a 32-bit value in your source code. | ||
15 | # | ||
16 | # This will be an integer division of F_USB below, as it is sourced by | ||
17 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # Build Options | ||
52 | # change yes to no to disable | ||
53 | # | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
55 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
57 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
60 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
62 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
63 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
64 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
65 | UNICODE_ENABLE = no # Unicode | ||
66 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
67 | AUDIO_ENABLE = no # Audio output on port C6 | ||
68 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
69 | |||
70 | RAW_ENABLE = yes | 1 | RAW_ENABLE = yes |
71 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | 2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file |
diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index e41f2186b..4f702fab4 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk | |||
@@ -1,6 +1,7 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = drivers/issi/is31fl3736.c \ | 2 | SRC = drivers/issi/is31fl3736.c \ |
3 | drivers/avr/i2c_master.c \ | 3 | drivers/avr/i2c_master.c \ |
4 | quantum/color.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | 5 | keyboards/wilba_tech/wt_mono_backlight.c \ |
5 | keyboards/wilba_tech/wt_main.c | 6 | keyboards/wilba_tech/wt_main.c |
6 | 7 | ||
diff --git a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk index f072c6719..8834bf0c8 100644 --- a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk | |||
@@ -1,68 +1,2 @@ | |||
1 | # project specific files | ||
2 | SRC = keyboards/wilba_tech/wt_main.c | ||
3 | |||
4 | # MCU name | ||
5 | MCU = atmega32u4 | ||
6 | |||
7 | # Processor frequency. | ||
8 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
9 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
11 | # automatically to create a 32-bit value in your source code. | ||
12 | # | ||
13 | # This will be an integer division of F_USB below, as it is sourced by | ||
14 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | ||
46 | |||
47 | |||
48 | # Build Options | ||
49 | # change yes to no to disable | ||
50 | # | ||
51 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
52 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
53 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
54 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
55 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
56 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
57 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
58 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
59 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
60 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
61 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
62 | UNICODE_ENABLE = no # Unicode | ||
63 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
64 | AUDIO_ENABLE = no # Audio output on port C6 | ||
65 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
66 | |||
67 | RAW_ENABLE = yes | 1 | RAW_ENABLE = yes |
68 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | 2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file |
diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index f072c6719..7ba0b9223 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/rules.mk | |||
@@ -1,50 +1,19 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = keyboards/wilba_tech/wt_main.c | 2 | SRC = keyboards/wilba_tech/wt_main.c |
3 | 3 | ||
4 | # MCU name | 4 | # MCU name |
5 | MCU = atmega32u4 | 5 | MCU = atmega32u4 |
6 | 6 | ||
7 | # Processor frequency. | 7 | # Bootloader selection |
8 | # This will define a symbol, F_CPU, in all source code files equal to the | 8 | # Teensy halfkay |
9 | # processor frequency in Hz. You can then use this symbol in your source code to | 9 | # Pro Micro caterina |
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 10 | # Atmel DFU atmel-dfu |
11 | # automatically to create a 32-bit value in your source code. | 11 | # LUFA DFU lufa-dfu |
12 | # | 12 | # QMK DFU qmk-dfu |
13 | # This will be an integer division of F_USB below, as it is sourced by | 13 | # ATmega32A bootloadHID |
14 | # F_USB after it has run through any CPU prescalers. Note that this value | 14 | # ATmega328P USBasp |
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | 15 | BOOTLOADER = atmel-dfu |
46 | 16 | ||
47 | |||
48 | # Build Options | 17 | # Build Options |
49 | # change yes to no to disable | 18 | # change yes to no to disable |
50 | # | 19 | # |
diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index f1bcb990a..9d67c317b 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h | |||
@@ -179,14 +179,30 @@ | |||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | 181 | ||
182 | #define WT_MONO_BACKLIGHT | 182 | // enable the mono backlight |
183 | #define MONO_BACKLIGHT_ENABLED 1 | ||
184 | |||
185 | // disable backlight when USB suspended (PC sleep/hibernate/shutdown) | ||
186 | #define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 | ||
187 | |||
188 | // disable backlight after timeout in minutes, 0 = no timeout | ||
189 | #define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 | ||
190 | |||
191 | // the default brightness | ||
192 | #define MONO_BACKLIGHT_BRIGHTNESS 255 | ||
193 | |||
194 | // the default effect | ||
195 | #define MONO_BACKLIGHT_EFFECT 1 | ||
196 | |||
197 | // the default effect speed (0-3) | ||
198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | ||
183 | 199 | ||
184 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 200 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
185 | 201 | ||
186 | // EEPROM usage | 202 | // EEPROM usage |
187 | 203 | ||
188 | // TODO: refactor with new user EEPROM code (coming soon) | 204 | // TODO: refactor with new user EEPROM code (coming soon) |
189 | #define EEPROM_MAGIC 0x451F | 205 | #define EEPROM_MAGIC 0x4520 |
190 | #define EEPROM_MAGIC_ADDR 34 | 206 | #define EEPROM_MAGIC_ADDR 34 |
191 | // Bump this every time we change what we store | 207 | // Bump this every time we change what we store |
192 | // This will automatically reset the EEPROM with defaults | 208 | // This will automatically reset the EEPROM with defaults |
@@ -194,9 +210,11 @@ | |||
194 | #define EEPROM_VERSION 0x08 | 210 | #define EEPROM_VERSION 0x08 |
195 | #define EEPROM_VERSION_ADDR 36 | 211 | #define EEPROM_VERSION_ADDR 36 |
196 | 212 | ||
197 | // Dynamic keymap starts after EEPROM version | 213 | // Backlight config starts after EEPROM version |
198 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | 214 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 |
199 | // Dynamic macro starts after dynamic keymaps (37+(4*5*15*2)) = (37+600) | 215 | // Dynamic keymap starts after backlight config (37+7) |
200 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 | 216 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 |
201 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 | 217 | // Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) |
218 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 | ||
219 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 | ||
202 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | 220 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 |
diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk index 76a07d7a4..8834bf0c8 100644 --- a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk | |||
@@ -1,71 +1,2 @@ | |||
1 | # project specific files | ||
2 | SRC = drivers/issi/is31fl3736.c \ | ||
3 | drivers/avr/i2c_master.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | ||
5 | keyboards/wilba_tech/wt_main.c | ||
6 | |||
7 | # MCU name | ||
8 | MCU = atmega32u4 | ||
9 | |||
10 | # Processor frequency. | ||
11 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
12 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
14 | # automatically to create a 32-bit value in your source code. | ||
15 | # | ||
16 | # This will be an integer division of F_USB below, as it is sourced by | ||
17 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # Build Options | ||
52 | # change yes to no to disable | ||
53 | # | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
55 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
57 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
60 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
62 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
63 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
64 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
65 | UNICODE_ENABLE = no # Unicode | ||
66 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
67 | AUDIO_ENABLE = no # Audio output on port C6 | ||
68 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
69 | |||
70 | RAW_ENABLE = yes | 1 | RAW_ENABLE = yes |
71 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | 2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file |
diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index e41f2186b..9b5bd1e7f 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk | |||
@@ -1,50 +1,21 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = drivers/issi/is31fl3736.c \ | 2 | SRC = drivers/issi/is31fl3736.c \ |
3 | drivers/avr/i2c_master.c \ | 3 | drivers/avr/i2c_master.c \ |
4 | quantum/color.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | 5 | keyboards/wilba_tech/wt_mono_backlight.c \ |
5 | keyboards/wilba_tech/wt_main.c | 6 | keyboards/wilba_tech/wt_main.c |
6 | 7 | ||
7 | # MCU name | 8 | # MCU name |
8 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
9 | 10 | ||
10 | # Processor frequency. | 11 | # Bootloader selection |
11 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
12 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
14 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
15 | # | 16 | # QMK DFU qmk-dfu |
16 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
17 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
49 | 20 | ||
50 | 21 | ||
diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index 765ed8ee1..8b2437fc9 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h | |||
@@ -179,14 +179,30 @@ | |||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | 181 | ||
182 | #define WT_MONO_BACKLIGHT | 182 | // enable the mono backlight |
183 | #define MONO_BACKLIGHT_ENABLED 1 | ||
184 | |||
185 | // disable backlight when USB suspended (PC sleep/hibernate/shutdown) | ||
186 | #define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 | ||
187 | |||
188 | // disable backlight after timeout in minutes, 0 = no timeout | ||
189 | #define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 | ||
190 | |||
191 | // the default brightness | ||
192 | #define MONO_BACKLIGHT_BRIGHTNESS 255 | ||
193 | |||
194 | // the default effect | ||
195 | #define MONO_BACKLIGHT_EFFECT 1 | ||
196 | |||
197 | // the default effect speed (0-3) | ||
198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | ||
183 | 199 | ||
184 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 200 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
185 | 201 | ||
186 | // EEPROM usage | 202 | // EEPROM usage |
187 | 203 | ||
188 | // TODO: refactor with new user EEPROM code (coming soon) | 204 | // TODO: refactor with new user EEPROM code (coming soon) |
189 | #define EEPROM_MAGIC 0x451F | 205 | #define EEPROM_MAGIC 0x4520 |
190 | #define EEPROM_MAGIC_ADDR 34 | 206 | #define EEPROM_MAGIC_ADDR 34 |
191 | // Bump this every time we change what we store | 207 | // Bump this every time we change what we store |
192 | // This will automatically reset the EEPROM with defaults | 208 | // This will automatically reset the EEPROM with defaults |
@@ -194,9 +210,11 @@ | |||
194 | #define EEPROM_VERSION 0x08 | 210 | #define EEPROM_VERSION 0x08 |
195 | #define EEPROM_VERSION_ADDR 36 | 211 | #define EEPROM_VERSION_ADDR 36 |
196 | 212 | ||
197 | // Dynamic keymap starts after EEPROM version | 213 | // Backlight config starts after EEPROM version |
198 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | 214 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 |
199 | // Dynamic macro starts after dynamic keymaps (37+(4*5*15*2)) = (37+600) | 215 | // Dynamic keymap starts after backlight config (37+7) |
200 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 | 216 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 |
201 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 | 217 | // Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) |
218 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 | ||
219 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 | ||
202 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | 220 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 |
diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk index 76a07d7a4..8834bf0c8 100644 --- a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk | |||
@@ -1,71 +1,2 @@ | |||
1 | # project specific files | ||
2 | SRC = drivers/issi/is31fl3736.c \ | ||
3 | drivers/avr/i2c_master.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | ||
5 | keyboards/wilba_tech/wt_main.c | ||
6 | |||
7 | # MCU name | ||
8 | MCU = atmega32u4 | ||
9 | |||
10 | # Processor frequency. | ||
11 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
12 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
14 | # automatically to create a 32-bit value in your source code. | ||
15 | # | ||
16 | # This will be an integer division of F_USB below, as it is sourced by | ||
17 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # Build Options | ||
52 | # change yes to no to disable | ||
53 | # | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
55 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
57 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
60 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
62 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
63 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
64 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
65 | UNICODE_ENABLE = no # Unicode | ||
66 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
67 | AUDIO_ENABLE = no # Audio output on port C6 | ||
68 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
69 | |||
70 | RAW_ENABLE = yes | 1 | RAW_ENABLE = yes |
71 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | 2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file |
diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index e41f2186b..9b5bd1e7f 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk | |||
@@ -1,50 +1,21 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = drivers/issi/is31fl3736.c \ | 2 | SRC = drivers/issi/is31fl3736.c \ |
3 | drivers/avr/i2c_master.c \ | 3 | drivers/avr/i2c_master.c \ |
4 | quantum/color.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | 5 | keyboards/wilba_tech/wt_mono_backlight.c \ |
5 | keyboards/wilba_tech/wt_main.c | 6 | keyboards/wilba_tech/wt_main.c |
6 | 7 | ||
7 | # MCU name | 8 | # MCU name |
8 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
9 | 10 | ||
10 | # Processor frequency. | 11 | # Bootloader selection |
11 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
12 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
14 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
15 | # | 16 | # QMK DFU qmk-dfu |
16 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
17 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
49 | 20 | ||
50 | 21 | ||
diff --git a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk index f072c6719..8834bf0c8 100644 --- a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk | |||
@@ -1,68 +1,2 @@ | |||
1 | # project specific files | ||
2 | SRC = keyboards/wilba_tech/wt_main.c | ||
3 | |||
4 | # MCU name | ||
5 | MCU = atmega32u4 | ||
6 | |||
7 | # Processor frequency. | ||
8 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
9 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
11 | # automatically to create a 32-bit value in your source code. | ||
12 | # | ||
13 | # This will be an integer division of F_USB below, as it is sourced by | ||
14 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | ||
46 | |||
47 | |||
48 | # Build Options | ||
49 | # change yes to no to disable | ||
50 | # | ||
51 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
52 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
53 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
54 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
55 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
56 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
57 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
58 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
59 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
60 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
61 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
62 | UNICODE_ENABLE = no # Unicode | ||
63 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
64 | AUDIO_ENABLE = no # Audio output on port C6 | ||
65 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
66 | |||
67 | RAW_ENABLE = yes | 1 | RAW_ENABLE = yes |
68 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | 2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file |
diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index f1c632289..f349608cd 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk | |||
@@ -1,47 +1,17 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = keyboards/wilba_tech/wt_main.c | 2 | SRC = keyboards/wilba_tech/wt_main.c |
3 | 3 | ||
4 | # MCU name | 4 | # MCU name |
5 | MCU = atmega32u4 | 5 | MCU = atmega32u4 |
6 | 6 | ||
7 | # Processor frequency. | 7 | # Bootloader selection |
8 | # This will define a symbol, F_CPU, in all source code files equal to the | 8 | # Teensy halfkay |
9 | # processor frequency in Hz. You can then use this symbol in your source code to | 9 | # Pro Micro caterina |
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 10 | # Atmel DFU atmel-dfu |
11 | # automatically to create a 32-bit value in your source code. | 11 | # LUFA DFU lufa-dfu |
12 | # | 12 | # QMK DFU qmk-dfu |
13 | # This will be an integer division of F_USB below, as it is sourced by | 13 | # ATmega32A bootloadHID |
14 | # F_USB after it has run through any CPU prescalers. Note that this value | 14 | # ATmega328P USBasp |
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | 15 | BOOTLOADER = atmel-dfu |
46 | 16 | ||
47 | 17 | ||
diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index 024370d54..f63bbf69c 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h | |||
@@ -179,14 +179,33 @@ | |||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | 181 | ||
182 | #define WT_MONO_BACKLIGHT | 182 | // enable the mono backlight |
183 | #define MONO_BACKLIGHT_ENABLED 1 | ||
184 | |||
185 | // enable the RGB indicator for WT75-A | ||
186 | #define MONO_BACKLIGHT_WT75_A | ||
187 | |||
188 | // disable backlight when USB suspended (PC sleep/hibernate/shutdown) | ||
189 | #define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 | ||
190 | |||
191 | // disable backlight after timeout in minutes, 0 = no timeout | ||
192 | #define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 | ||
193 | |||
194 | // the default brightness | ||
195 | #define MONO_BACKLIGHT_BRIGHTNESS 255 | ||
196 | |||
197 | // the default effect | ||
198 | #define MONO_BACKLIGHT_EFFECT 1 | ||
199 | |||
200 | // the default effect speed (0-3) | ||
201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | ||
183 | 202 | ||
184 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 203 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
185 | 204 | ||
186 | // EEPROM usage | 205 | // EEPROM usage |
187 | 206 | ||
188 | // TODO: refactor with new user EEPROM code (coming soon) | 207 | // TODO: refactor with new user EEPROM code (coming soon) |
189 | #define EEPROM_MAGIC 0x451F | 208 | #define EEPROM_MAGIC 0x4520 |
190 | #define EEPROM_MAGIC_ADDR 34 | 209 | #define EEPROM_MAGIC_ADDR 34 |
191 | // Bump this every time we change what we store | 210 | // Bump this every time we change what we store |
192 | // This will automatically reset the EEPROM with defaults | 211 | // This will automatically reset the EEPROM with defaults |
@@ -194,9 +213,11 @@ | |||
194 | #define EEPROM_VERSION 0x08 | 213 | #define EEPROM_VERSION 0x08 |
195 | #define EEPROM_VERSION_ADDR 36 | 214 | #define EEPROM_VERSION_ADDR 36 |
196 | 215 | ||
197 | // Dynamic keymap starts after EEPROM version | 216 | // Backlight config starts after EEPROM version |
198 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | 217 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 |
199 | // Dynamic macro starts after dynamic keymaps (37+(4*6*15*2)) = (37+720) | 218 | // Dynamic keymap starts after backlight config (37+7) |
200 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 757 | 219 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 |
201 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 267 | 220 | // Dynamic macro starts after dynamic keymaps (44+(4*6*15*2)) = (44+720) |
221 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 764 | ||
222 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 260 | ||
202 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | 223 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 |
diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk index 76a07d7a4..8834bf0c8 100644 --- a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk | |||
@@ -1,71 +1,2 @@ | |||
1 | # project specific files | ||
2 | SRC = drivers/issi/is31fl3736.c \ | ||
3 | drivers/avr/i2c_master.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | ||
5 | keyboards/wilba_tech/wt_main.c | ||
6 | |||
7 | # MCU name | ||
8 | MCU = atmega32u4 | ||
9 | |||
10 | # Processor frequency. | ||
11 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
12 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
14 | # automatically to create a 32-bit value in your source code. | ||
15 | # | ||
16 | # This will be an integer division of F_USB below, as it is sourced by | ||
17 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # Build Options | ||
52 | # change yes to no to disable | ||
53 | # | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
55 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
57 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
60 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
62 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
63 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
64 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
65 | UNICODE_ENABLE = no # Unicode | ||
66 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
67 | AUDIO_ENABLE = no # Audio output on port C6 | ||
68 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
69 | |||
70 | RAW_ENABLE = yes | 1 | RAW_ENABLE = yes |
71 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | 2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file |
diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index e41f2186b..9b5bd1e7f 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk | |||
@@ -1,50 +1,21 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = drivers/issi/is31fl3736.c \ | 2 | SRC = drivers/issi/is31fl3736.c \ |
3 | drivers/avr/i2c_master.c \ | 3 | drivers/avr/i2c_master.c \ |
4 | quantum/color.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | 5 | keyboards/wilba_tech/wt_mono_backlight.c \ |
5 | keyboards/wilba_tech/wt_main.c | 6 | keyboards/wilba_tech/wt_main.c |
6 | 7 | ||
7 | # MCU name | 8 | # MCU name |
8 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
9 | 10 | ||
10 | # Processor frequency. | 11 | # Bootloader selection |
11 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
12 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
14 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
15 | # | 16 | # QMK DFU qmk-dfu |
16 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
17 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
49 | 20 | ||
50 | 21 | ||
diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index b8ada14e8..b173b0241 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h | |||
@@ -179,14 +179,33 @@ | |||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | 181 | ||
182 | #define WT_MONO_BACKLIGHT | 182 | // enable the mono backlight |
183 | #define MONO_BACKLIGHT_ENABLED 1 | ||
184 | |||
185 | // enable the RGB indicator for WT75-A | ||
186 | #define MONO_BACKLIGHT_WT75_A | ||
187 | |||
188 | // disable backlight when USB suspended (PC sleep/hibernate/shutdown) | ||
189 | #define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 | ||
190 | |||
191 | // disable backlight after timeout in minutes, 0 = no timeout | ||
192 | #define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 | ||
193 | |||
194 | // the default brightness | ||
195 | #define MONO_BACKLIGHT_BRIGHTNESS 255 | ||
196 | |||
197 | // the default effect | ||
198 | #define MONO_BACKLIGHT_EFFECT 1 | ||
199 | |||
200 | // the default effect speed (0-3) | ||
201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | ||
183 | 202 | ||
184 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 203 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
185 | 204 | ||
186 | // EEPROM usage | 205 | // EEPROM usage |
187 | 206 | ||
188 | // TODO: refactor with new user EEPROM code (coming soon) | 207 | // TODO: refactor with new user EEPROM code (coming soon) |
189 | #define EEPROM_MAGIC 0x451F | 208 | #define EEPROM_MAGIC 0x4520 |
190 | #define EEPROM_MAGIC_ADDR 34 | 209 | #define EEPROM_MAGIC_ADDR 34 |
191 | // Bump this every time we change what we store | 210 | // Bump this every time we change what we store |
192 | // This will automatically reset the EEPROM with defaults | 211 | // This will automatically reset the EEPROM with defaults |
@@ -194,9 +213,11 @@ | |||
194 | #define EEPROM_VERSION 0x08 | 213 | #define EEPROM_VERSION 0x08 |
195 | #define EEPROM_VERSION_ADDR 36 | 214 | #define EEPROM_VERSION_ADDR 36 |
196 | 215 | ||
197 | // Dynamic keymap starts after EEPROM version | 216 | // Backlight config starts after EEPROM version |
198 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | 217 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 |
199 | // Dynamic macro starts after dynamic keymaps (37+(4*6*16*2)) = (37+768) | 218 | // Dynamic keymap starts after backlight config (37+7) |
200 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 805 | 219 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 |
201 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 219 | 220 | // Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) |
221 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 | ||
222 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 | ||
202 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | 223 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 |
diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk index 76a07d7a4..8834bf0c8 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk | |||
@@ -1,71 +1,2 @@ | |||
1 | # project specific files | ||
2 | SRC = drivers/issi/is31fl3736.c \ | ||
3 | drivers/avr/i2c_master.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | ||
5 | keyboards/wilba_tech/wt_main.c | ||
6 | |||
7 | # MCU name | ||
8 | MCU = atmega32u4 | ||
9 | |||
10 | # Processor frequency. | ||
11 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
12 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
14 | # automatically to create a 32-bit value in your source code. | ||
15 | # | ||
16 | # This will be an integer division of F_USB below, as it is sourced by | ||
17 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # Build Options | ||
52 | # change yes to no to disable | ||
53 | # | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
55 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
57 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
60 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
62 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
63 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
64 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
65 | UNICODE_ENABLE = no # Unicode | ||
66 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
67 | AUDIO_ENABLE = no # Audio output on port C6 | ||
68 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
69 | |||
70 | RAW_ENABLE = yes | 1 | RAW_ENABLE = yes |
71 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | 2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file |
diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index e41f2186b..9b5bd1e7f 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk | |||
@@ -1,50 +1,21 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = drivers/issi/is31fl3736.c \ | 2 | SRC = drivers/issi/is31fl3736.c \ |
3 | drivers/avr/i2c_master.c \ | 3 | drivers/avr/i2c_master.c \ |
4 | quantum/color.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | 5 | keyboards/wilba_tech/wt_mono_backlight.c \ |
5 | keyboards/wilba_tech/wt_main.c | 6 | keyboards/wilba_tech/wt_main.c |
6 | 7 | ||
7 | # MCU name | 8 | # MCU name |
8 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
9 | 10 | ||
10 | # Processor frequency. | 11 | # Bootloader selection |
11 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
12 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
14 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
15 | # | 16 | # QMK DFU qmk-dfu |
16 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
17 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
49 | 20 | ||
50 | 21 | ||
diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h new file mode 100644 index 000000000..710599877 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/config.h | |||
@@ -0,0 +1,223 @@ | |||
1 | /* Copyright 2018 Jason Williams (Wilba) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #include "config_common.h" | ||
20 | |||
21 | /* USB Device descriptor parameter */ | ||
22 | #define VENDOR_ID 0x6582 // wilba.tech | ||
23 | #define PRODUCT_ID 0x075C // 75-C | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER wilba.tech | ||
26 | #define PRODUCT wilba.tech WT75-C | ||
27 | #define DESCRIPTION wilba.tech WT75-C | ||
28 | |||
29 | /* key matrix size */ | ||
30 | #define MATRIX_ROWS 6 | ||
31 | #define MATRIX_COLS 16 | ||
32 | |||
33 | /* | ||
34 | * Keyboard Matrix Assignments | ||
35 | * | ||
36 | * Change this to how you wired your keyboard | ||
37 | * COLS: AVR pins used for columns, left to right | ||
38 | * ROWS: AVR pins used for rows, top to bottom | ||
39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
41 | * | ||
42 | */ | ||
43 | #define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } | ||
44 | #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, B7, D4 } | ||
45 | #define UNUSED_PINS | ||
46 | |||
47 | /* COL2ROW, ROW2COL */ | ||
48 | #define DIODE_DIRECTION ROW2COL | ||
49 | |||
50 | // #define BACKLIGHT_PIN B7 | ||
51 | // #define BACKLIGHT_BREATHING | ||
52 | // #define BACKLIGHT_LEVELS 3 | ||
53 | |||
54 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
55 | #define DEBOUNCE 5 | ||
56 | |||
57 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
58 | //#define MATRIX_HAS_GHOST | ||
59 | |||
60 | /* number of backlight levels */ | ||
61 | |||
62 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
63 | #define LOCKING_SUPPORT_ENABLE | ||
64 | /* Locking resynchronize hack */ | ||
65 | #define LOCKING_RESYNC_ENABLE | ||
66 | |||
67 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
68 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
69 | */ | ||
70 | // #define GRAVE_ESC_CTRL_OVERRIDE | ||
71 | |||
72 | /* | ||
73 | * Force NKRO | ||
74 | * | ||
75 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
76 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
77 | * makefile for this to work.) | ||
78 | * | ||
79 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
80 | * until the next keyboard reset. | ||
81 | * | ||
82 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
83 | * fully operational during normal computer usage. | ||
84 | * | ||
85 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
86 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
87 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
88 | * power-up. | ||
89 | * | ||
90 | */ | ||
91 | //#define FORCE_NKRO | ||
92 | |||
93 | /* | ||
94 | * Magic Key Options | ||
95 | * | ||
96 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
97 | * the keyboard. They are best used in combination with the HID Listen program, | ||
98 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
99 | * | ||
100 | * The options below allow the magic key functionality to be changed. This is | ||
101 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
102 | * | ||
103 | */ | ||
104 | |||
105 | /* control how magic key switches layers */ | ||
106 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
107 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
108 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
109 | |||
110 | /* override magic key keymap */ | ||
111 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
112 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
113 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
114 | //#define MAGIC_KEY_HELP1 H | ||
115 | //#define MAGIC_KEY_HELP2 SLASH | ||
116 | //#define MAGIC_KEY_DEBUG D | ||
117 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
118 | //#define MAGIC_KEY_DEBUG_KBD K | ||
119 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
120 | //#define MAGIC_KEY_VERSION V | ||
121 | //#define MAGIC_KEY_STATUS S | ||
122 | //#define MAGIC_KEY_CONSOLE C | ||
123 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | ||
124 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | ||
125 | //#define MAGIC_KEY_LAYER0 0 | ||
126 | //#define MAGIC_KEY_LAYER1 1 | ||
127 | //#define MAGIC_KEY_LAYER2 2 | ||
128 | //#define MAGIC_KEY_LAYER3 3 | ||
129 | //#define MAGIC_KEY_LAYER4 4 | ||
130 | //#define MAGIC_KEY_LAYER5 5 | ||
131 | //#define MAGIC_KEY_LAYER6 6 | ||
132 | //#define MAGIC_KEY_LAYER7 7 | ||
133 | //#define MAGIC_KEY_LAYER8 8 | ||
134 | //#define MAGIC_KEY_LAYER9 9 | ||
135 | //#define MAGIC_KEY_BOOTLOADER PAUSE | ||
136 | //#define MAGIC_KEY_LOCK CAPS | ||
137 | //#define MAGIC_KEY_EEPROM E | ||
138 | //#define MAGIC_KEY_NKRO N | ||
139 | //#define MAGIC_KEY_SLEEP_LED Z | ||
140 | |||
141 | /* | ||
142 | * Feature disable options | ||
143 | * These options are also useful to firmware size reduction. | ||
144 | */ | ||
145 | |||
146 | /* disable debug print */ | ||
147 | //#define NO_DEBUG | ||
148 | |||
149 | /* disable print */ | ||
150 | //#define NO_PRINT | ||
151 | |||
152 | /* disable action features */ | ||
153 | //#define NO_ACTION_LAYER | ||
154 | //#define NO_ACTION_TAPPING | ||
155 | //#define NO_ACTION_ONESHOT | ||
156 | //#define NO_ACTION_MACRO | ||
157 | //#define NO_ACTION_FUNCTION | ||
158 | |||
159 | /* | ||
160 | * MIDI options | ||
161 | */ | ||
162 | |||
163 | /* Prevent use of disabled MIDI features in the keymap */ | ||
164 | //#define MIDI_ENABLE_STRICT 1 | ||
165 | |||
166 | /* enable basic MIDI features: | ||
167 | - MIDI notes can be sent when in Music mode is on | ||
168 | */ | ||
169 | //#define MIDI_BASIC | ||
170 | |||
171 | /* enable advanced MIDI features: | ||
172 | - MIDI notes can be added to the keymap | ||
173 | - Octave shift and transpose | ||
174 | - Virtual sustain, portamento, and modulation wheel | ||
175 | - etc. | ||
176 | */ | ||
177 | //#define MIDI_ADVANCED | ||
178 | |||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
181 | |||
182 | // enable the mono backlight | ||
183 | #define MONO_BACKLIGHT_ENABLED 1 | ||
184 | |||
185 | // enable the RGB indicator for WT75-A | ||
186 | #define MONO_BACKLIGHT_WT75_A | ||
187 | |||
188 | // disable backlight when USB suspended (PC sleep/hibernate/shutdown) | ||
189 | #define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 | ||
190 | |||
191 | // disable backlight after timeout in minutes, 0 = no timeout | ||
192 | #define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 | ||
193 | |||
194 | // the default brightness | ||
195 | #define MONO_BACKLIGHT_BRIGHTNESS 255 | ||
196 | |||
197 | // the default effect | ||
198 | #define MONO_BACKLIGHT_EFFECT 1 | ||
199 | |||
200 | // the default effect speed (0-3) | ||
201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | ||
202 | |||
203 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
204 | |||
205 | // EEPROM usage | ||
206 | |||
207 | // TODO: refactor with new user EEPROM code (coming soon) | ||
208 | #define EEPROM_MAGIC 0x4520 | ||
209 | #define EEPROM_MAGIC_ADDR 34 | ||
210 | // Bump this every time we change what we store | ||
211 | // This will automatically reset the EEPROM with defaults | ||
212 | // and avoid loading invalid data from the EEPROM | ||
213 | #define EEPROM_VERSION 0x08 | ||
214 | #define EEPROM_VERSION_ADDR 36 | ||
215 | |||
216 | // Backlight config starts after EEPROM version | ||
217 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
218 | // Dynamic keymap starts after backlight config (37+7) | ||
219 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 | ||
220 | // Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) | ||
221 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 | ||
222 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 | ||
223 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt75_c/info.json b/keyboards/wilba_tech/wt75_c/info.json new file mode 100644 index 000000000..bf63b2d00 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/info.json | |||
@@ -0,0 +1,12 @@ | |||
1 | { | ||
2 | "keyboard_name": "wilba.tech WT75-A", | ||
3 | "url": "https://wilba.tech", | ||
4 | "maintainer": "Wilba", | ||
5 | "width": 16.25, | ||
6 | "height": 6.5, | ||
7 | "layouts": { | ||
8 | "LAYOUT_all": { | ||
9 | "layout": [{"label":"0", "x":0, "y":0}, {"label":"1", "x":1.25, "y":0}, {"label":"2", "x":2.25, "y":0}, {"label":"3", "x":3.25, "y":0}, {"label":"4", "x":4.25, "y":0}, {"label":"5", "x":5.5, "y":0}, {"label":"6", "x":6.5, "y":0}, {"label":"7", "x":7.5, "y":0}, {"label":"8", "x":8.5, "y":0}, {"label":"9", "x":9.75, "y":0}, {"label":"10", "x":10.75, "y":0}, {"label":"11", "x":11.75, "y":0}, {"label":"12", "x":12.75, "y":0}, {"label":"13", "x":14, "y":0}, {"label":"14", "x":0, "y":1.25}, {"label":"15", "x":1, "y":1.25}, {"label":"16", "x":2, "y":1.25}, {"label":"17", "x":3, "y":1.25}, {"label":"18", "x":4, "y":1.25}, {"label":"19", "x":5, "y":1.25}, {"label":"20", "x":6, "y":1.25}, {"label":"21", "x":7, "y":1.25}, {"label":"22", "x":8, "y":1.25}, {"label":"23", "x":9, "y":1.25}, {"label":"24", "x":10, "y":1.25}, {"label":"25", "x":11, "y":1.25}, {"label":"26", "x":12, "y":1.25}, {"label":"27", "x":13, "y":1.25}, {"label":"28", "x":14, "y":1.25}, {"label":"29", "x":15.25, "y":1.25}, {"label":"30", "x":0, "y":2.25, "w":1.5}, {"label":"31", "x":1.5, "y":2.25}, {"label":"32", "x":2.5, "y":2.25}, {"label":"33", "x":3.5, "y":2.25}, {"label":"34", "x":4.5, "y":2.25}, {"label":"35", "x":5.5, "y":2.25}, {"label":"36", "x":6.5, "y":2.25}, {"label":"37", "x":7.5, "y":2.25}, {"label":"38", "x":8.5, "y":2.25}, {"label":"39", "x":9.5, "y":2.25}, {"label":"40", "x":10.5, "y":2.25}, {"label":"41", "x":11.5, "y":2.25}, {"label":"42", "x":12.5, "y":2.25}, {"label":"43", "x":13.5, "y":2.25, "w":1.5}, {"label":"44", "x":15.25, "y":2.25}, {"label":"45", "x":0, "y":3.25, "w":1.75}, {"label":"46", "x":1.75, "y":3.25}, {"label":"47", "x":2.75, "y":3.25}, {"label":"48", "x":3.75, "y":3.25}, {"label":"49", "x":4.75, "y":3.25}, {"label":"50", "x":5.75, "y":3.25}, {"label":"51", "x":6.75, "y":3.25}, {"label":"52", "x":7.75, "y":3.25}, {"label":"53", "x":8.75, "y":3.25}, {"label":"54", "x":9.75, "y":3.25}, {"label":"55", "x":10.75, "y":3.25}, {"label":"56", "x":11.75, "y":3.25}, {"label":"57", "x":12.75, "y":3.25, "w":2.25}, {"label":"58", "x":15.25, "y":3.25}, {"label":"59", "x":0, "y":4.25, "w":2.25}, {"label":"60", "x":2.25, "y":4.25}, {"label":"61", "x":3.25, "y":4.25}, {"label":"62", "x":4.25, "y":4.25}, {"label":"63", "x":5.25, "y":4.25}, {"label":"64", "x":6.25, "y":4.25}, {"label":"65", "x":7.25, "y":4.25}, {"label":"66", "x":8.25, "y":4.25}, {"label":"67", "x":9.25, "y":4.25}, {"label":"68", "x":10.25, "y":4.25}, {"label":"69", "x":11.25, "y":4.25}, {"label":"70", "x":12.25, "y":4.25, "w":1.75}, {"label":"71", "x":14.25, "y":4.5}, {"label":"72", "x":0, "y":5.25, "w":1.5}, {"label":"73", "x":1.5, "y":5.25}, {"label":"74", "x":2.5, "y":5.25, "w":1.5}, {"label":"75", "x":4, "y":5.25, "w":6}, {"label":"76", "x":10, "y":5.25, "w":1.5}, {"label":"77", "x":11.5, "y":5.25, "w":1.5}, {"label":"78", "x":13.25, "y":5.5}, {"label":"79", "x":14.25, "y":5.5}, {"label":"80", "x":15.25, "y":5.5}] | ||
10 | } | ||
11 | } | ||
12 | } \ No newline at end of file | ||
diff --git a/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c b/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c new file mode 100644 index 000000000..0eedd4cb1 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/default/keymap.c | |||
@@ -0,0 +1,41 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | |||
5 | // Default layer | ||
6 | [0] = LAYOUT_all( | ||
7 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, | ||
8 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_DEL, | ||
9 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, | ||
10 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | ||
11 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, | ||
12 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), | ||
13 | |||
14 | // Fn1 Layer | ||
15 | [1] = LAYOUT_all( | ||
16 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
17 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
18 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
19 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
20 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
22 | |||
23 | // Fn2 Layer | ||
24 | [2] = LAYOUT_all( | ||
25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
31 | |||
32 | // Fn3 Layer | ||
33 | [3] = LAYOUT_all( | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
38 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
40 | }; | ||
41 | |||
diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c b/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c new file mode 100644 index 000000000..0eedd4cb1 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/keymap.c | |||
@@ -0,0 +1,41 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | |||
5 | // Default layer | ||
6 | [0] = LAYOUT_all( | ||
7 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, | ||
8 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_DEL, | ||
9 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, | ||
10 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | ||
11 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, | ||
12 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), | ||
13 | |||
14 | // Fn1 Layer | ||
15 | [1] = LAYOUT_all( | ||
16 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
17 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
18 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
19 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
20 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
22 | |||
23 | // Fn2 Layer | ||
24 | [2] = LAYOUT_all( | ||
25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
31 | |||
32 | // Fn3 Layer | ||
33 | [3] = LAYOUT_all( | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
38 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
40 | }; | ||
41 | |||
diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk new file mode 100644 index 000000000..8834bf0c8 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | RAW_ENABLE = yes | ||
2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/wilba_tech/wt75_c/readme.md b/keyboards/wilba_tech/wt75_c/readme.md new file mode 100644 index 000000000..7bcef1900 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/readme.md | |||
@@ -0,0 +1,13 @@ | |||
1 | # wilba.tech WT75-C | ||
2 | |||
3 | WT75-C is a keyboard PCB supporting 75% layout with offset arrow keys. [More info at wilba.tech](https://wilba.tech/) | ||
4 | |||
5 | Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) | ||
6 | Hardware Supported: wilba.tech WT75-C | ||
7 | Hardware Availability: Custom keyboard group buys | ||
8 | |||
9 | Make example for this keyboard (after setting up your build environment): | ||
10 | |||
11 | make wilba_tech/wt75_c:default | ||
12 | |||
13 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file | ||
diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk new file mode 100644 index 000000000..9b5bd1e7f --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/rules.mk | |||
@@ -0,0 +1,39 @@ | |||
1 | # project specific files | ||
2 | SRC = drivers/issi/is31fl3736.c \ | ||
3 | drivers/avr/i2c_master.c \ | ||
4 | quantum/color.c \ | ||
5 | keyboards/wilba_tech/wt_mono_backlight.c \ | ||
6 | keyboards/wilba_tech/wt_main.c | ||
7 | |||
8 | # MCU name | ||
9 | MCU = atmega32u4 | ||
10 | |||
11 | # Bootloader selection | ||
12 | # Teensy halfkay | ||
13 | # Pro Micro caterina | ||
14 | # Atmel DFU atmel-dfu | ||
15 | # LUFA DFU lufa-dfu | ||
16 | # QMK DFU qmk-dfu | ||
17 | # ATmega32A bootloadHID | ||
18 | # ATmega328P USBasp | ||
19 | BOOTLOADER = atmel-dfu | ||
20 | |||
21 | |||
22 | # Build Options | ||
23 | # change yes to no to disable | ||
24 | # | ||
25 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
26 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
27 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
28 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
29 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
30 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
31 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
32 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
33 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
34 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
35 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
36 | UNICODE_ENABLE = no # Unicode | ||
37 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
38 | AUDIO_ENABLE = no # Audio output on port C6 | ||
39 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
diff --git a/keyboards/wilba_tech/wt75_c/wt75_c.c b/keyboards/wilba_tech/wt75_c/wt75_c.c new file mode 100644 index 000000000..ccff6d62c --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/wt75_c.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* Copyright 2018 Jason Williams (Wilba) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | // Nothing to see here, move along... ;-) | ||
diff --git a/keyboards/wilba_tech/wt75_c/wt75_c.h b/keyboards/wilba_tech/wt75_c/wt75_c.h new file mode 100644 index 000000000..4c74bb117 --- /dev/null +++ b/keyboards/wilba_tech/wt75_c/wt75_c.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* Copyright 2018 Jason Williams (Wilba) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #include "quantum.h" | ||
20 | |||
21 | #define ____ KC_NO | ||
22 | |||
23 | // Right switch of split backspace is at 2,13 and is the only switch | ||
24 | // whose physical position doesn't match switch matrix position :-( | ||
25 | // However, it also makes no sense to view the physical as 16 columns, | ||
26 | // so the numbering goes 00 to 14. Deal with it. | ||
27 | // | ||
28 | // 0,15 exists on PCB but is blocked by the 7V blocker so until someone | ||
29 | // designs a case that uses it, we can just forget it exists. | ||
30 | |||
31 | #define LAYOUT_all( \ | ||
32 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ | ||
33 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ | ||
34 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ | ||
35 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ | ||
36 | K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ | ||
37 | K500, K501, K502, K506, K510, K511, K512, K513, K515 \ | ||
38 | ) { \ | ||
39 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014, ____ }, \ | ||
40 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ | ||
41 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215 }, \ | ||
42 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, K315 }, \ | ||
43 | { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, ____, ____ }, \ | ||
44 | { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, ____, K515 } \ | ||
45 | } | ||
46 | |||
diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 3ba90230b..15dac9047 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h | |||
@@ -179,14 +179,30 @@ | |||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | 181 | ||
182 | #define WT_MONO_BACKLIGHT | 182 | // enable the mono backlight |
183 | #define MONO_BACKLIGHT_ENABLED 1 | ||
184 | |||
185 | // disable backlight when USB suspended (PC sleep/hibernate/shutdown) | ||
186 | #define MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 | ||
187 | |||
188 | // disable backlight after timeout in minutes, 0 = no timeout | ||
189 | #define MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 | ||
190 | |||
191 | // the default brightness | ||
192 | #define MONO_BACKLIGHT_BRIGHTNESS 255 | ||
193 | |||
194 | // the default effect | ||
195 | #define MONO_BACKLIGHT_EFFECT 1 | ||
196 | |||
197 | // the default effect speed (0-3) | ||
198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | ||
183 | 199 | ||
184 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 200 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
185 | 201 | ||
186 | // EEPROM usage | 202 | // EEPROM usage |
187 | 203 | ||
188 | // TODO: refactor with new user EEPROM code (coming soon) | 204 | // TODO: refactor with new user EEPROM code (coming soon) |
189 | #define EEPROM_MAGIC 0x451F | 205 | #define EEPROM_MAGIC 0x4520 |
190 | #define EEPROM_MAGIC_ADDR 34 | 206 | #define EEPROM_MAGIC_ADDR 34 |
191 | // Bump this every time we change what we store | 207 | // Bump this every time we change what we store |
192 | // This will automatically reset the EEPROM with defaults | 208 | // This will automatically reset the EEPROM with defaults |
@@ -194,9 +210,11 @@ | |||
194 | #define EEPROM_VERSION 0x08 | 210 | #define EEPROM_VERSION 0x08 |
195 | #define EEPROM_VERSION_ADDR 36 | 211 | #define EEPROM_VERSION_ADDR 36 |
196 | 212 | ||
197 | // Dynamic keymap starts after EEPROM version | 213 | // Backlight config starts after EEPROM version |
198 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | 214 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 |
199 | // Dynamic macro starts after dynamic keymaps (37+(4*6*17*2)) = (37+816) | 215 | // Dynamic keymap starts after backlight config (37+7) |
200 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 853 | 216 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 |
201 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 171 | 217 | // Dynamic macro starts after dynamic keymaps (44+(4*6*17*2)) = (44+816) |
218 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 860 | ||
219 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 164 | ||
202 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | 220 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 |
diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk index 76a07d7a4..8834bf0c8 100644 --- a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk | |||
@@ -1,71 +1,2 @@ | |||
1 | # project specific files | ||
2 | SRC = drivers/issi/is31fl3736.c \ | ||
3 | drivers/avr/i2c_master.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | ||
5 | keyboards/wilba_tech/wt_main.c | ||
6 | |||
7 | # MCU name | ||
8 | MCU = atmega32u4 | ||
9 | |||
10 | # Processor frequency. | ||
11 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
12 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
14 | # automatically to create a 32-bit value in your source code. | ||
15 | # | ||
16 | # This will be an integer division of F_USB below, as it is sourced by | ||
17 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # Build Options | ||
52 | # change yes to no to disable | ||
53 | # | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
55 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
57 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
60 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
62 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
63 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
64 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
65 | UNICODE_ENABLE = no # Unicode | ||
66 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
67 | AUDIO_ENABLE = no # Audio output on port C6 | ||
68 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
69 | |||
70 | RAW_ENABLE = yes | 1 | RAW_ENABLE = yes |
71 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | 2 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file |
diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index e41f2186b..9b5bd1e7f 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk | |||
@@ -1,50 +1,21 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = drivers/issi/is31fl3736.c \ | 2 | SRC = drivers/issi/is31fl3736.c \ |
3 | drivers/avr/i2c_master.c \ | 3 | drivers/avr/i2c_master.c \ |
4 | quantum/color.c \ | ||
4 | keyboards/wilba_tech/wt_mono_backlight.c \ | 5 | keyboards/wilba_tech/wt_mono_backlight.c \ |
5 | keyboards/wilba_tech/wt_main.c | 6 | keyboards/wilba_tech/wt_main.c |
6 | 7 | ||
7 | # MCU name | 8 | # MCU name |
8 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
9 | 10 | ||
10 | # Processor frequency. | 11 | # Bootloader selection |
11 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
12 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
13 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
14 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
15 | # | 16 | # QMK DFU qmk-dfu |
16 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
17 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
18 | # does not *change* the processor frequency - it should merely be updated to | ||
19 | # reflect the processor speed set externally so that the code can use accurate | ||
20 | # software delays. | ||
21 | F_CPU = 16000000 | ||
22 | |||
23 | |||
24 | # | ||
25 | # LUFA specific | ||
26 | # | ||
27 | # Target architecture (see library "Board Types" documentation). | ||
28 | ARCH = AVR8 | ||
29 | |||
30 | # Input clock frequency. | ||
31 | # This will define a symbol, F_USB, in all source code files equal to the | ||
32 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
33 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
34 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
35 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
36 | # at the end, this will be done automatically to create a 32-bit value in your | ||
37 | # source code. | ||
38 | # | ||
39 | # If no clock division is performed on the input clock inside the AVR (via the | ||
40 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
41 | F_USB = $(F_CPU) | ||
42 | |||
43 | # Interrupt driven control endpoint task(+60) | ||
44 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
45 | |||
46 | |||
47 | # Boot Section | ||
48 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
49 | 20 | ||
50 | 21 | ||
diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index f1c632289..5e87a2995 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk | |||
@@ -1,50 +1,19 @@ | |||
1 | # project specific files | 1 | # project specific files |
2 | SRC = keyboards/wilba_tech/wt_main.c | 2 | SRC = keyboards/wilba_tech/wt_main.c |
3 | 3 | ||
4 | # MCU name | 4 | # MCU name |
5 | MCU = atmega32u4 | 5 | MCU = atmega32u4 |
6 | 6 | ||
7 | # Processor frequency. | 7 | # Bootloader selection |
8 | # This will define a symbol, F_CPU, in all source code files equal to the | 8 | # Teensy halfkay |
9 | # processor frequency in Hz. You can then use this symbol in your source code to | 9 | # Pro Micro caterina |
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 10 | # Atmel DFU atmel-dfu |
11 | # automatically to create a 32-bit value in your source code. | 11 | # LUFA DFU lufa-dfu |
12 | # | 12 | # QMK DFU qmk-dfu |
13 | # This will be an integer division of F_USB below, as it is sourced by | 13 | # ATmega32A bootloadHID |
14 | # F_USB after it has run through any CPU prescalers. Note that this value | 14 | # ATmega328P USBasp |
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | 15 | BOOTLOADER = atmel-dfu |
46 | 16 | ||
47 | |||
48 | # Build Options | 17 | # Build Options |
49 | # change yes to no to disable | 18 | # change yes to no to disable |
50 | # | 19 | # |
diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index e6ea4a21b..32fc6f9e4 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c | |||
@@ -20,9 +20,9 @@ | |||
20 | #if RGB_BACKLIGHT_ENABLED | 20 | #if RGB_BACKLIGHT_ENABLED |
21 | #include "keyboards/wilba_tech/wt_rgb_backlight.h" | 21 | #include "keyboards/wilba_tech/wt_rgb_backlight.h" |
22 | #endif // RGB_BACKLIGHT_ENABLED | 22 | #endif // RGB_BACKLIGHT_ENABLED |
23 | #ifdef WT_MONO_BACKLIGHT | 23 | #if MONO_BACKLIGHT_ENABLED |
24 | #include "keyboards/wilba_tech/wt_mono_backlight.h" | 24 | #include "keyboards/wilba_tech/wt_mono_backlight.h" |
25 | #endif // WT_MONO_BACKLIGHT | 25 | #endif // MONO_BACKLIGHT_ENABLED |
26 | #include "keyboards/wilba_tech/via_api.h" // Temporary hack | 26 | #include "keyboards/wilba_tech/via_api.h" // Temporary hack |
27 | #include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack | 27 | #include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack |
28 | 28 | ||
@@ -150,7 +150,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) | |||
150 | break; | 150 | break; |
151 | } | 151 | } |
152 | #endif // DYNAMIC_KEYMAP_ENABLE | 152 | #endif // DYNAMIC_KEYMAP_ENABLE |
153 | #if RGB_BACKLIGHT_ENABLED | 153 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
154 | case id_backlight_config_set_value: | 154 | case id_backlight_config_set_value: |
155 | { | 155 | { |
156 | backlight_config_set_value(command_data); | 156 | backlight_config_set_value(command_data); |
@@ -166,7 +166,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) | |||
166 | backlight_config_save(); | 166 | backlight_config_save(); |
167 | break; | 167 | break; |
168 | } | 168 | } |
169 | #endif // RGB_BACKLIGHT_ENABLED | 169 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
170 | case id_eeprom_reset: | 170 | case id_eeprom_reset: |
171 | { | 171 | { |
172 | eeprom_reset(); | 172 | eeprom_reset(); |
@@ -202,16 +202,16 @@ void main_init(void) | |||
202 | // If the EEPROM has the magic, the data is good. | 202 | // If the EEPROM has the magic, the data is good. |
203 | // OK to load from EEPROM. | 203 | // OK to load from EEPROM. |
204 | if (eeprom_is_valid()) { | 204 | if (eeprom_is_valid()) { |
205 | #if RGB_BACKLIGHT_ENABLED | 205 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
206 | backlight_config_load(); | 206 | backlight_config_load(); |
207 | #endif // RGB_BACKLIGHT_ENABLED | 207 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
208 | } else { | 208 | } else { |
209 | #if RGB_BACKLIGHT_ENABLED | 209 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
210 | // If the EEPROM has not been saved before, or is out of date, | 210 | // If the EEPROM has not been saved before, or is out of date, |
211 | // save the default values to the EEPROM. Default values | 211 | // save the default values to the EEPROM. Default values |
212 | // come from construction of the zeal_backlight_config instance. | 212 | // come from construction of the backlight_config instance. |
213 | backlight_config_save(); | 213 | backlight_config_save(); |
214 | #endif // RGB_BACKLIGHT_ENABLED | 214 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
215 | #ifdef DYNAMIC_KEYMAP_ENABLE | 215 | #ifdef DYNAMIC_KEYMAP_ENABLE |
216 | // This resets the keymaps in EEPROM to what is in flash. | 216 | // This resets the keymaps in EEPROM to what is in flash. |
217 | dynamic_keymap_reset(); | 217 | dynamic_keymap_reset(); |
@@ -222,20 +222,13 @@ void main_init(void) | |||
222 | eeprom_set_valid(true); | 222 | eeprom_set_valid(true); |
223 | } | 223 | } |
224 | 224 | ||
225 | #if RGB_BACKLIGHT_ENABLED | 225 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
226 | // Initialize LED drivers for backlight. | ||
227 | backlight_init_drivers(); | ||
228 | |||
229 | backlight_timer_init(); | ||
230 | backlight_timer_enable(); | ||
231 | #endif // RGB_BACKLIGHT_ENABLED | ||
232 | #ifdef WT_MONO_BACKLIGHT | ||
233 | // Initialize LED drivers for backlight. | 226 | // Initialize LED drivers for backlight. |
234 | backlight_init_drivers(); | 227 | backlight_init_drivers(); |
235 | 228 | ||
236 | backlight_timer_init(); | 229 | backlight_timer_init(); |
237 | backlight_timer_enable(); | 230 | backlight_timer_enable(); |
238 | #endif // WT_MONO_BACKLIGHT | 231 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
239 | } | 232 | } |
240 | 233 | ||
241 | void bootmagic_lite(void) | 234 | void bootmagic_lite(void) |
@@ -267,22 +260,18 @@ void matrix_init_kb(void) | |||
267 | 260 | ||
268 | void matrix_scan_kb(void) | 261 | void matrix_scan_kb(void) |
269 | { | 262 | { |
270 | #if RGB_BACKLIGHT_ENABLED | 263 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
271 | // This only updates the LED driver buffers if something has changed. | ||
272 | backlight_update_pwm_buffers(); | ||
273 | #endif // RGB_BACKLIGHT_ENABLED | ||
274 | #ifdef WT_MONO_BACKLIGHT | ||
275 | // This only updates the LED driver buffers if something has changed. | 264 | // This only updates the LED driver buffers if something has changed. |
276 | backlight_update_pwm_buffers(); | 265 | backlight_update_pwm_buffers(); |
277 | #endif | 266 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
278 | matrix_scan_user(); | 267 | matrix_scan_user(); |
279 | } | 268 | } |
280 | 269 | ||
281 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) | 270 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) |
282 | { | 271 | { |
283 | #if RGB_BACKLIGHT_ENABLED | 272 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
284 | process_record_backlight(keycode, record); | 273 | process_record_backlight(keycode, record); |
285 | #endif // RGB_BACKLIGHT_ENABLED | 274 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
286 | 275 | ||
287 | switch(keycode) { | 276 | switch(keycode) { |
288 | case FN_MO13: | 277 | case FN_MO13: |
@@ -372,22 +361,23 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
372 | 361 | ||
373 | void led_set_kb(uint8_t usb_led) | 362 | void led_set_kb(uint8_t usb_led) |
374 | { | 363 | { |
375 | #if RGB_BACKLIGHT_ENABLED | 364 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
376 | backlight_set_indicator_state(usb_led); | 365 | backlight_set_indicator_state(usb_led); |
377 | #endif // RGB_BACKLIGHT_ENABLED | 366 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
367 | led_set_user(usb_led); | ||
378 | } | 368 | } |
379 | 369 | ||
380 | void suspend_power_down_kb(void) | 370 | void suspend_power_down_kb(void) |
381 | { | 371 | { |
382 | #if RGB_BACKLIGHT_ENABLED | 372 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
383 | backlight_set_suspend_state(true); | 373 | backlight_set_suspend_state(true); |
384 | #endif // RGB_BACKLIGHT_ENABLED | 374 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
385 | } | 375 | } |
386 | 376 | ||
387 | void suspend_wakeup_init_kb(void) | 377 | void suspend_wakeup_init_kb(void) |
388 | { | 378 | { |
389 | #if RGB_BACKLIGHT_ENABLED | 379 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
390 | backlight_set_suspend_state(false); | 380 | backlight_set_suspend_state(false); |
391 | #endif // RGB_BACKLIGHT_ENABLED | 381 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
392 | } | 382 | } |
393 | 383 | ||
diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index bf485bce1..69d82e582 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c | |||
@@ -14,20 +14,43 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "quantum.h" | ||
17 | #include "wt_mono_backlight.h" | 18 | #include "wt_mono_backlight.h" |
19 | #include "wt_rgb_backlight_api.h" // reuse these for now | ||
20 | #include "wt_rgb_backlight_keycodes.h" // reuse these for now | ||
21 | |||
18 | #include "drivers/avr/i2c_master.h" | 22 | #include "drivers/avr/i2c_master.h" |
19 | #include "drivers/issi/is31fl3736.h" | 23 | #include "drivers/issi/is31fl3736.h" |
20 | |||
21 | #include <avr/interrupt.h> | 24 | #include <avr/interrupt.h> |
22 | 25 | ||
26 | #include "progmem.h" | ||
27 | #include "quantum/color.h" | ||
28 | |||
23 | #define ISSI_ADDR_DEFAULT 0x50 | 29 | #define ISSI_ADDR_DEFAULT 0x50 |
24 | 30 | ||
31 | #define BACKLIGHT_EFFECT_MAX 3 | ||
32 | |||
33 | #ifndef MONO_BACKLIGHT_COLOR_1 | ||
34 | #define MONO_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } | ||
35 | #endif | ||
36 | |||
37 | backlight_config g_config = { | ||
38 | .disable_when_usb_suspended = MONO_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, | ||
39 | .disable_after_timeout = MONO_BACKLIGHT_DISABLE_AFTER_TIMEOUT, | ||
40 | .brightness = MONO_BACKLIGHT_BRIGHTNESS, | ||
41 | .effect = MONO_BACKLIGHT_EFFECT, | ||
42 | .effect_speed = MONO_BACKLIGHT_EFFECT_SPEED, | ||
43 | .color_1 = MONO_BACKLIGHT_COLOR_1, | ||
44 | }; | ||
45 | |||
25 | bool g_suspend_state = false; | 46 | bool g_suspend_state = false; |
47 | uint8_t g_indicator_state = 0; | ||
26 | 48 | ||
27 | // Global tick at 20 Hz | 49 | // Global tick at 20 Hz |
28 | uint32_t g_tick = 0; | 50 | uint32_t g_tick = 0; |
29 | uint8_t g_config_effect_speed = 0; | 51 | |
30 | uint8_t g_config_brightness = 255; | 52 | // Ticks since any key was last hit. |
53 | uint32_t g_any_key_hit = 0; | ||
31 | 54 | ||
32 | void backlight_init_drivers(void) | 55 | void backlight_init_drivers(void) |
33 | { | 56 | { |
@@ -41,6 +64,10 @@ void backlight_init_drivers(void) | |||
41 | IS31FL3736_update_led_control_registers( ISSI_ADDR_DEFAULT, 0x00 ); | 64 | IS31FL3736_update_led_control_registers( ISSI_ADDR_DEFAULT, 0x00 ); |
42 | } | 65 | } |
43 | 66 | ||
67 | void backlight_set_key_hit(uint8_t row, uint8_t column) | ||
68 | { | ||
69 | g_any_key_hit = 0; | ||
70 | } | ||
44 | 71 | ||
45 | // This is (F_CPU/1024) / 20 Hz | 72 | // This is (F_CPU/1024) / 20 Hz |
46 | // = 15625 Hz / 20 Hz | 73 | // = 15625 Hz / 20 Hz |
@@ -82,13 +109,63 @@ void backlight_set_suspend_state(bool state) | |||
82 | g_suspend_state = state; | 109 | g_suspend_state = state; |
83 | } | 110 | } |
84 | 111 | ||
112 | void backlight_set_indicator_state(uint8_t state) | ||
113 | { | ||
114 | g_indicator_state = state; | ||
115 | } | ||
116 | |||
117 | void backlight_set_brightness_all( uint8_t value ) | ||
118 | { | ||
119 | IS31FL3736_mono_set_brightness_all( value ); | ||
120 | } | ||
121 | |||
122 | void backlight_effect_all_off(void) | ||
123 | { | ||
124 | IS31FL3736_mono_set_brightness_all( 0 ); | ||
125 | } | ||
126 | |||
127 | void backlight_effect_all_on(void) | ||
128 | { | ||
129 | IS31FL3736_mono_set_brightness_all( g_config.brightness ); | ||
130 | } | ||
131 | |||
132 | void backlight_effect_raindrops(bool initialize) | ||
133 | { | ||
134 | // Change one LED every tick | ||
135 | uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % 96 : 255; | ||
136 | |||
137 | for ( int i=0; i<96; i++ ) | ||
138 | { | ||
139 | // If initialize, all get set to random brightness | ||
140 | // If not, all but one will stay the same as before. | ||
141 | if ( initialize || i == led_to_change ) | ||
142 | { | ||
143 | IS31FL3736_mono_set_brightness(i, rand() & 0xFF ); | ||
144 | } | ||
145 | } | ||
146 | } | ||
147 | |||
85 | void backlight_effect_cycle_all(void) | 148 | void backlight_effect_cycle_all(void) |
86 | { | 149 | { |
87 | uint8_t offset = ( g_tick << g_config_effect_speed ) & 0xFF; | 150 | uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF; |
88 | 151 | ||
89 | backlight_set_brightness_all( offset ); | 152 | backlight_set_brightness_all( offset ); |
90 | } | 153 | } |
91 | 154 | ||
155 | // This runs after another backlight effect and replaces | ||
156 | // colors already set | ||
157 | void backlight_effect_indicators(void) | ||
158 | { | ||
159 | #if defined(MONO_BACKLIGHT_WT75_A) | ||
160 | HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; | ||
161 | RGB rgb = hsv_to_rgb( hsv ); | ||
162 | // G8, H8, I8 -> (6*8+7) (7*8+7), (8*8+7) | ||
163 | IS31FL3736_mono_set_brightness(55, rgb.r); | ||
164 | IS31FL3736_mono_set_brightness(63, rgb.g); | ||
165 | IS31FL3736_mono_set_brightness(71, rgb.b); | ||
166 | #endif // MONO_BACKLIGHT_WT75_A | ||
167 | } | ||
168 | |||
92 | ISR(TIMER3_COMPA_vect) | 169 | ISR(TIMER3_COMPA_vect) |
93 | { | 170 | { |
94 | // delay 1 second before driving LEDs or doing anything else | 171 | // delay 1 second before driving LEDs or doing anything else |
@@ -100,8 +177,154 @@ ISR(TIMER3_COMPA_vect) | |||
100 | 177 | ||
101 | g_tick++; | 178 | g_tick++; |
102 | 179 | ||
103 | //backlight_effect_cycle_all(); | 180 | if ( g_any_key_hit < 0xFFFFFFFF ) |
104 | backlight_set_brightness_all( 255 ); | 181 | { |
182 | g_any_key_hit++; | ||
183 | } | ||
184 | |||
185 | // Ideally we would also stop sending zeros to the LED driver PWM buffers | ||
186 | // while suspended and just do a software shutdown. This is a cheap hack for now. | ||
187 | bool suspend_backlight = ((g_suspend_state && g_config.disable_when_usb_suspended) || | ||
188 | (g_config.disable_after_timeout > 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); | ||
189 | uint8_t effect = suspend_backlight ? 0 : g_config.effect; | ||
190 | |||
191 | // Keep track of the effect used last time, | ||
192 | // detect change in effect, so each effect can | ||
193 | // have an optional initialization. | ||
194 | static uint8_t effect_last = 255; | ||
195 | bool initialize = effect != effect_last; | ||
196 | effect_last = effect; | ||
197 | |||
198 | // this gets ticked at 20 Hz. | ||
199 | // each effect can opt to do calculations | ||
200 | // and/or request PWM buffer updates. | ||
201 | switch ( effect ) | ||
202 | { | ||
203 | case 0: | ||
204 | backlight_effect_all_off(); | ||
205 | break; | ||
206 | case 1: | ||
207 | backlight_effect_all_on();; | ||
208 | break; | ||
209 | case 2: | ||
210 | backlight_effect_raindrops(initialize); | ||
211 | break; | ||
212 | default: | ||
213 | backlight_effect_all_off(); | ||
214 | break; | ||
215 | } | ||
216 | |||
217 | if ( ! suspend_backlight ) | ||
218 | { | ||
219 | backlight_effect_indicators(); | ||
220 | } | ||
221 | } | ||
222 | |||
223 | // Some helpers for setting/getting HSV | ||
224 | void _set_color( HS *color, uint8_t *data ) | ||
225 | { | ||
226 | color->h = data[0]; | ||
227 | color->s = data[1]; | ||
228 | } | ||
229 | |||
230 | void _get_color( HS *color, uint8_t *data ) | ||
231 | { | ||
232 | data[0] = color->h; | ||
233 | data[1] = color->s; | ||
234 | } | ||
235 | |||
236 | void backlight_config_set_value( uint8_t *data ) | ||
237 | { | ||
238 | bool reinitialize = false; | ||
239 | uint8_t *value_id = &(data[0]); | ||
240 | uint8_t *value_data = &(data[1]); | ||
241 | switch ( *value_id ) | ||
242 | { | ||
243 | case id_disable_when_usb_suspended: | ||
244 | { | ||
245 | g_config.disable_when_usb_suspended = (bool)*value_data; | ||
246 | break; | ||
247 | } | ||
248 | case id_disable_after_timeout: | ||
249 | { | ||
250 | g_config.disable_after_timeout = *value_data; | ||
251 | break; | ||
252 | } | ||
253 | case id_brightness: | ||
254 | { | ||
255 | g_config.brightness = *value_data; | ||
256 | break; | ||
257 | } | ||
258 | case id_effect: | ||
259 | { | ||
260 | g_config.effect = *value_data; | ||
261 | break; | ||
262 | } | ||
263 | case id_effect_speed: | ||
264 | { | ||
265 | g_config.effect_speed = *value_data; | ||
266 | break; | ||
267 | } | ||
268 | case id_color_1: | ||
269 | { | ||
270 | _set_color( &(g_config.color_1), value_data ); | ||
271 | break; | ||
272 | } | ||
273 | } | ||
274 | |||
275 | if ( reinitialize ) | ||
276 | { | ||
277 | backlight_init_drivers(); | ||
278 | } | ||
279 | } | ||
280 | |||
281 | void backlight_config_get_value( uint8_t *data ) | ||
282 | { | ||
283 | uint8_t *value_id = &(data[0]); | ||
284 | uint8_t *value_data = &(data[1]); | ||
285 | switch ( *value_id ) | ||
286 | { | ||
287 | case id_disable_when_usb_suspended: | ||
288 | { | ||
289 | *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); | ||
290 | break; | ||
291 | } | ||
292 | case id_disable_after_timeout: | ||
293 | { | ||
294 | *value_data = g_config.disable_after_timeout; | ||
295 | break; | ||
296 | } | ||
297 | case id_brightness: | ||
298 | { | ||
299 | *value_data = g_config.brightness; | ||
300 | break; | ||
301 | } | ||
302 | case id_effect: | ||
303 | { | ||
304 | *value_data = g_config.effect; | ||
305 | break; | ||
306 | } | ||
307 | case id_effect_speed: | ||
308 | { | ||
309 | *value_data = g_config.effect_speed; | ||
310 | break; | ||
311 | } | ||
312 | case id_color_1: | ||
313 | { | ||
314 | _get_color( &(g_config.color_1), value_data ); | ||
315 | break; | ||
316 | } | ||
317 | } | ||
318 | } | ||
319 | |||
320 | void backlight_config_load(void) | ||
321 | { | ||
322 | eeprom_read_block( &g_config, ((void*)MONO_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); | ||
323 | } | ||
324 | |||
325 | void backlight_config_save(void) | ||
326 | { | ||
327 | eeprom_update_block( &g_config, ((void*)MONO_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); | ||
105 | } | 328 | } |
106 | 329 | ||
107 | void backlight_update_pwm_buffers(void) | 330 | void backlight_update_pwm_buffers(void) |
@@ -109,8 +332,110 @@ void backlight_update_pwm_buffers(void) | |||
109 | IS31FL3736_update_pwm_buffers(ISSI_ADDR_DEFAULT,0x00); | 332 | IS31FL3736_update_pwm_buffers(ISSI_ADDR_DEFAULT,0x00); |
110 | } | 333 | } |
111 | 334 | ||
112 | void backlight_set_brightness_all( uint8_t value ) | 335 | bool process_record_backlight(uint16_t keycode, keyrecord_t *record) |
113 | { | 336 | { |
114 | IS31FL3736_mono_set_brightness_all( value ); | 337 | // Record keypresses for backlight effects |
338 | if ( record->event.pressed ) | ||
339 | { | ||
340 | backlight_set_key_hit( record->event.key.row, record->event.key.col ); | ||
341 | } | ||
342 | |||
343 | switch(keycode) | ||
344 | { | ||
345 | case BR_INC: | ||
346 | if (record->event.pressed) | ||
347 | { | ||
348 | backlight_brightness_increase(); | ||
349 | } | ||
350 | return false; | ||
351 | break; | ||
352 | case BR_DEC: | ||
353 | if (record->event.pressed) | ||
354 | { | ||
355 | backlight_brightness_decrease(); | ||
356 | } | ||
357 | return false; | ||
358 | break; | ||
359 | case EF_INC: | ||
360 | if (record->event.pressed) | ||
361 | { | ||
362 | backlight_effect_increase(); | ||
363 | } | ||
364 | return false; | ||
365 | break; | ||
366 | case EF_DEC: | ||
367 | if (record->event.pressed) | ||
368 | { | ||
369 | backlight_effect_decrease(); | ||
370 | } | ||
371 | return false; | ||
372 | break; | ||
373 | case ES_INC: | ||
374 | if (record->event.pressed) | ||
375 | { | ||
376 | backlight_effect_speed_increase(); | ||
377 | } | ||
378 | return false; | ||
379 | break; | ||
380 | case ES_DEC: | ||
381 | if (record->event.pressed) | ||
382 | { | ||
383 | backlight_effect_speed_decrease(); | ||
384 | } | ||
385 | return false; | ||
386 | break; | ||
387 | } | ||
388 | |||
389 | return true; | ||
390 | } | ||
391 | |||
392 | // Deals with the messy details of incrementing an integer | ||
393 | uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) | ||
394 | { | ||
395 | int16_t new_value = value; | ||
396 | new_value += step; | ||
397 | return MIN( MAX( new_value, min ), max ); | ||
115 | } | 398 | } |
116 | 399 | ||
400 | uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) | ||
401 | { | ||
402 | int16_t new_value = value; | ||
403 | new_value -= step; | ||
404 | return MIN( MAX( new_value, min ), max ); | ||
405 | } | ||
406 | |||
407 | void backlight_effect_increase(void) | ||
408 | { | ||
409 | g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); | ||
410 | backlight_config_save(); | ||
411 | } | ||
412 | |||
413 | void backlight_effect_decrease(void) | ||
414 | { | ||
415 | g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); | ||
416 | backlight_config_save(); | ||
417 | } | ||
418 | |||
419 | void backlight_effect_speed_increase(void) | ||
420 | { | ||
421 | g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); | ||
422 | backlight_config_save(); | ||
423 | } | ||
424 | |||
425 | void backlight_effect_speed_decrease(void) | ||
426 | { | ||
427 | g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); | ||
428 | backlight_config_save(); | ||
429 | } | ||
430 | |||
431 | void backlight_brightness_increase(void) | ||
432 | { | ||
433 | g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); | ||
434 | backlight_config_save(); | ||
435 | } | ||
436 | |||
437 | void backlight_brightness_decrease(void) | ||
438 | { | ||
439 | g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); | ||
440 | backlight_config_save(); | ||
441 | } | ||
diff --git a/keyboards/wilba_tech/wt_mono_backlight.h b/keyboards/wilba_tech/wt_mono_backlight.h index 70031bedc..2f913d2cb 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.h +++ b/keyboards/wilba_tech/wt_mono_backlight.h | |||
@@ -19,6 +19,36 @@ | |||
19 | #include <stdint.h> | 19 | #include <stdint.h> |
20 | #include <stdbool.h> | 20 | #include <stdbool.h> |
21 | 21 | ||
22 | #include "quantum/color.h" | ||
23 | |||
24 | typedef struct PACKED | ||
25 | { | ||
26 | uint8_t h; | ||
27 | uint8_t s; | ||
28 | } HS; | ||
29 | |||
30 | typedef struct | ||
31 | { | ||
32 | bool disable_when_usb_suspended:1; // | | ||
33 | bool __pad1:1; // | | ||
34 | bool __pad2:1; // | | ||
35 | bool __pad3:1; // | | ||
36 | bool __pad4:1; // | | ||
37 | bool __pad5:1; // | | ||
38 | bool __pad6:1; // | | ||
39 | bool __pad7:1; // 1 byte | ||
40 | uint8_t disable_after_timeout; // 1 byte | ||
41 | uint8_t brightness; // 1 byte | ||
42 | uint8_t effect; // 1 byte | ||
43 | uint8_t effect_speed; // 1 byte | ||
44 | HS color_1; // 2 bytes (Indicator Color for Xeno) | ||
45 | } backlight_config; // = 7 bytes | ||
46 | |||
47 | void backlight_config_load(void); | ||
48 | void backlight_config_save(void); | ||
49 | void backlight_config_set_value( uint8_t *data ); | ||
50 | void backlight_config_get_value( uint8_t *data ); | ||
51 | |||
22 | void backlight_init_drivers(void); | 52 | void backlight_init_drivers(void); |
23 | 53 | ||
24 | void backlight_timer_init(void); | 54 | void backlight_timer_init(void); |
@@ -26,8 +56,24 @@ void backlight_timer_enable(void); | |||
26 | void backlight_timer_disable(void); | 56 | void backlight_timer_disable(void); |
27 | 57 | ||
28 | void backlight_set_suspend_state(bool state); | 58 | void backlight_set_suspend_state(bool state); |
59 | void backlight_set_indicator_state(uint8_t state); | ||
29 | 60 | ||
61 | // This should not be called from an interrupt | ||
62 | // (eg. from a timer interrupt). | ||
63 | // Call this while idle (in between matrix scans). | ||
64 | // If the buffer is dirty, it will update the driver with the buffer. | ||
30 | void backlight_update_pwm_buffers(void); | 65 | void backlight_update_pwm_buffers(void); |
31 | 66 | ||
32 | void backlight_set_brightness_all( uint8_t value ); | 67 | // Handle backlight specific keycodes |
68 | bool process_record_backlight(uint16_t keycode, keyrecord_t *record); | ||
69 | |||
70 | void backlight_set_key_hit(uint8_t row, uint8_t col); | ||
71 | |||
72 | void backlight_effect_increase(void); | ||
73 | void backlight_effect_decrease(void); | ||
74 | void backlight_effect_speed_increase(void); | ||
75 | void backlight_effect_speed_decrease(void); | ||
76 | |||
77 | void backlight_brightness_increase(void); | ||
78 | void backlight_brightness_decrease(void); | ||
33 | 79 | ||
diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index 5d20659f8..b8d63050c 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk | |||
@@ -1,5 +1,3 @@ | |||
1 | |||
2 | |||
3 | # project specific files | 1 | # project specific files |
4 | SRC = keyboards/wilba_tech/wt_main.c \ | 2 | SRC = keyboards/wilba_tech/wt_main.c \ |
5 | keyboards/wilba_tech/wt_rgb_backlight.c \ | 3 | keyboards/wilba_tech/wt_rgb_backlight.c \ |
@@ -10,42 +8,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ | |||
10 | # MCU name | 8 | # MCU name |
11 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
12 | 10 | ||
13 | # Processor frequency. | 11 | # Bootloader selection |
14 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
15 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
16 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
17 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
18 | # | 16 | # QMK DFU qmk-dfu |
19 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
20 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
21 | # does not *change* the processor frequency - it should merely be updated to | ||
22 | # reflect the processor speed set externally so that the code can use accurate | ||
23 | # software delays. | ||
24 | F_CPU = 16000000 | ||
25 | |||
26 | # | ||
27 | # LUFA specific | ||
28 | # | ||
29 | # Target architecture (see library "Board Types" documentation). | ||
30 | ARCH = AVR8 | ||
31 | |||
32 | # Input clock frequency. | ||
33 | # This will define a symbol, F_USB, in all source code files equal to the | ||
34 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
35 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
36 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
37 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
38 | # at the end, this will be done automatically to create a 32-bit value in your | ||
39 | # source code. | ||
40 | # | ||
41 | # If no clock division is performed on the input clock inside the AVR (via the | ||
42 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
43 | F_USB = $(F_CPU) | ||
44 | |||
45 | # Interrupt driven control endpoint task(+60) | ||
46 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
47 | |||
48 | # Boot Section | ||
49 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
50 | 20 | ||
51 | # Do not put the microcontroller into power saving mode | 21 | # Do not put the microcontroller into power saving mode |
diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk index a1cd32aad..f0df99656 100644 --- a/keyboards/wilba_tech/zeal65/rules.mk +++ b/keyboards/wilba_tech/zeal65/rules.mk | |||
@@ -1,5 +1,3 @@ | |||
1 | |||
2 | |||
3 | # project specific files | 1 | # project specific files |
4 | SRC = keyboards/wilba_tech/wt_main.c \ | 2 | SRC = keyboards/wilba_tech/wt_main.c \ |
5 | keyboards/wilba_tech/wt_rgb_backlight.c \ | 3 | keyboards/wilba_tech/wt_rgb_backlight.c \ |
@@ -10,42 +8,14 @@ SRC = keyboards/wilba_tech/wt_main.c \ | |||
10 | # MCU name | 8 | # MCU name |
11 | MCU = atmega32u4 | 9 | MCU = atmega32u4 |
12 | 10 | ||
13 | # Processor frequency. | 11 | # Bootloader selection |
14 | # This will define a symbol, F_CPU, in all source code files equal to the | 12 | # Teensy halfkay |
15 | # processor frequency in Hz. You can then use this symbol in your source code to | 13 | # Pro Micro caterina |
16 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | 14 | # Atmel DFU atmel-dfu |
17 | # automatically to create a 32-bit value in your source code. | 15 | # LUFA DFU lufa-dfu |
18 | # | 16 | # QMK DFU qmk-dfu |
19 | # This will be an integer division of F_USB below, as it is sourced by | 17 | # ATmega32A bootloadHID |
20 | # F_USB after it has run through any CPU prescalers. Note that this value | 18 | # ATmega328P USBasp |
21 | # does not *change* the processor frequency - it should merely be updated to | ||
22 | # reflect the processor speed set externally so that the code can use accurate | ||
23 | # software delays. | ||
24 | F_CPU = 16000000 | ||
25 | |||
26 | # | ||
27 | # LUFA specific | ||
28 | # | ||
29 | # Target architecture (see library "Board Types" documentation). | ||
30 | ARCH = AVR8 | ||
31 | |||
32 | # Input clock frequency. | ||
33 | # This will define a symbol, F_USB, in all source code files equal to the | ||
34 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
35 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
36 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
37 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
38 | # at the end, this will be done automatically to create a 32-bit value in your | ||
39 | # source code. | ||
40 | # | ||
41 | # If no clock division is performed on the input clock inside the AVR (via the | ||
42 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
43 | F_USB = $(F_CPU) | ||
44 | |||
45 | # Interrupt driven control endpoint task(+60) | ||
46 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
47 | |||
48 | # Boot Section | ||
49 | BOOTLOADER = atmel-dfu | 19 | BOOTLOADER = atmel-dfu |
50 | 20 | ||
51 | # Do not put the microcontroller into power saving mode | 21 | # Do not put the microcontroller into power saving mode |