diff options
author | Joel Challis <git@zvecr.com> | 2020-04-06 21:31:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 21:31:34 +0100 |
commit | 6c8e205fc0e5bc6372f057a257937ec3f88d5b8d (patch) | |
tree | a720a8700f3d8dbb474b8bd7ba9602b3861fbba2 | |
parent | 79010067539ad2043bd41e9701aa1cde21aec5d1 (diff) | |
download | qmk_firmware-6c8e205fc0e5bc6372f057a257937ec3f88d5b8d.tar.gz qmk_firmware-6c8e205fc0e5bc6372f057a257937ec3f88d5b8d.zip |
Remove keyboard level ws2812 spi drivers (#7694)
24 files changed, 31 insertions, 126 deletions
diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h index 7f8d7e8ff..fd73aad8b 100644 --- a/keyboards/cannonkeys/an_c/config.h +++ b/keyboards/cannonkeys/an_c/config.h | |||
@@ -49,11 +49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | #define LOCKING_RESYNC_ENABLE | 49 | #define LOCKING_RESYNC_ENABLE |
50 | 50 | ||
51 | #define RGBLIGHT_ANIMATIONS | 51 | #define RGBLIGHT_ANIMATIONS |
52 | 52 | #define RGB_DI_PIN B15 | |
53 | #define WS2812_LED_N 14 | 53 | #define RGBLED_NUM 14 |
54 | #define RGBLED_NUM WS2812_LED_N | ||
55 | #define PORT_WS2812 GPIOB | ||
56 | #define PIN_WS2812 15 | ||
57 | #define WS2812_SPI SPID2 | 54 | #define WS2812_SPI SPID2 |
58 | 55 | ||
59 | // Backlight config starts after VIA's EEPROM usage, | 56 | // Backlight config starts after VIA's EEPROM usage, |
diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk index 7ae14c498..4c432cf98 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk | |||
@@ -21,6 +21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover | |||
21 | CUSTOM_MATRIX = no # Custom matrix file | 21 | CUSTOM_MATRIX = no # Custom matrix file |
22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason | 22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason |
23 | RGBLIGHT_ENABLE = yes | 23 | RGBLIGHT_ENABLE = yes |
24 | WS2812_DRIVER = spi | ||
24 | 25 | ||
25 | LAYOUTS = 60_ansi 60_tsangan_hhkb | 26 | LAYOUTS = 60_ansi 60_tsangan_hhkb |
26 | 27 | ||
diff --git a/keyboards/cannonkeys/bluepill/keyboard.c b/keyboards/cannonkeys/bluepill/keyboard.c index de0015881..c2e5946d4 100644 --- a/keyboards/cannonkeys/bluepill/keyboard.c +++ b/keyboards/cannonkeys/bluepill/keyboard.c | |||
@@ -14,20 +14,7 @@ | |||
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | void matrix_init_kb(void){ | 16 | void matrix_init_kb(void){ |
17 | /* MOSI pin*/ | ||
18 | palSetPadMode(GPIOB, 15, PAL_MODE_STM32_ALTERNATE_PUSHPULL); | ||
19 | LED_ON(); | 17 | LED_ON(); |
20 | wait_ms(500); | 18 | wait_ms(500); |
21 | LED_OFF(); | 19 | LED_OFF(); |
22 | |||
23 | #ifdef RGBLIGHT_ENABLE | ||
24 | leds_init(); | ||
25 | #endif | ||
26 | } | ||
27 | |||
28 | void matrix_scan_kb(void) | ||
29 | { | ||
30 | #ifdef RGBLIGHT_ENABLE | ||
31 | rgblight_task(); | ||
32 | #endif | ||
33 | } | 20 | } |
diff --git a/keyboards/cannonkeys/bluepill/ws2812.h b/keyboards/cannonkeys/bluepill/ws2812.h deleted file mode 100644 index be37df766..000000000 --- a/keyboards/cannonkeys/bluepill/ws2812.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "hal.h" | ||
4 | #include "color.h" | ||
5 | |||
6 | |||
7 | void set_leds_color_rgb(LED_TYPE color); | ||
8 | void set_led_color_rgb(LED_TYPE color, int pos); | ||
9 | void leds_init(void); | ||
10 | |||
11 | |||
12 | // This is what users will use to interface with this | ||
13 | void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); | ||
14 | void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); | ||
15 | |||
16 | |||
17 | void WS2812_init(void); | ||
18 | void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue ); | ||
19 | void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); | ||
20 | void WS2812_send_colors(void); | ||
diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h index 6f8f6bd01..1c4325187 100644 --- a/keyboards/cannonkeys/instant60/config.h +++ b/keyboards/cannonkeys/instant60/config.h | |||
@@ -49,11 +49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | #define LOCKING_RESYNC_ENABLE | 49 | #define LOCKING_RESYNC_ENABLE |
50 | 50 | ||
51 | #define RGBLIGHT_ANIMATIONS | 51 | #define RGBLIGHT_ANIMATIONS |
52 | 52 | #define RGB_DI_PIN B15 | |
53 | #define WS2812_LED_N 14 | 53 | #define RGBLED_NUM 14 |
54 | #define RGBLED_NUM WS2812_LED_N | ||
55 | #define PORT_WS2812 GPIOB | ||
56 | #define PIN_WS2812 15 | ||
57 | #define WS2812_SPI SPID2 | 54 | #define WS2812_SPI SPID2 |
58 | 55 | ||
59 | // Backlight config starts after VIA's EEPROM usage, | 56 | // Backlight config starts after VIA's EEPROM usage, |
diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index 7ae14c498..4c432cf98 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk | |||
@@ -21,6 +21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover | |||
21 | CUSTOM_MATRIX = no # Custom matrix file | 21 | CUSTOM_MATRIX = no # Custom matrix file |
22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason | 22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason |
23 | RGBLIGHT_ENABLE = yes | 23 | RGBLIGHT_ENABLE = yes |
24 | WS2812_DRIVER = spi | ||
24 | 25 | ||
25 | LAYOUTS = 60_ansi 60_tsangan_hhkb | 26 | LAYOUTS = 60_ansi 60_tsangan_hhkb |
26 | 27 | ||
diff --git a/keyboards/cannonkeys/ortho48/config.h b/keyboards/cannonkeys/ortho48/config.h index bab0b95c0..c3b9dee18 100644 --- a/keyboards/cannonkeys/ortho48/config.h +++ b/keyboards/cannonkeys/ortho48/config.h | |||
@@ -52,14 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
52 | #define LOCKING_RESYNC_ENABLE | 52 | #define LOCKING_RESYNC_ENABLE |
53 | 53 | ||
54 | #define RGBLIGHT_ANIMATIONS | 54 | #define RGBLIGHT_ANIMATIONS |
55 | 55 | #define RGB_DI_PIN B15 | |
56 | #define WS2812_LED_N 9 | 56 | #define RGBLED_NUM 9 |
57 | #define RGBLED_NUM WS2812_LED_N | ||
58 | #define PORT_WS2812 GPIOB | ||
59 | #define PIN_WS2812 15 | ||
60 | #define WS2812_SPI SPID2 | 57 | #define WS2812_SPI SPID2 |
61 | 58 | ||
62 | |||
63 | /* | 59 | /* |
64 | * Feature disable options | 60 | * Feature disable options |
65 | * These options are also useful to firmware size reduction. | 61 | * These options are also useful to firmware size reduction. |
diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index 9c9b79e42..f2fc3e128 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk | |||
@@ -22,6 +22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | |||
22 | NKRO_ENABLE = yes # USB Nkey Rollover | 22 | NKRO_ENABLE = yes # USB Nkey Rollover |
23 | BACKLIGHT_ENABLE = yes | 23 | BACKLIGHT_ENABLE = yes |
24 | RGBLIGHT_ENABLE = yes | 24 | RGBLIGHT_ENABLE = yes |
25 | WS2812_DRIVER = spi | ||
25 | 26 | ||
26 | LAYOUTS = ortho_4x12 | 27 | LAYOUTS = ortho_4x12 |
27 | 28 | ||
diff --git a/keyboards/cannonkeys/ortho60/config.h b/keyboards/cannonkeys/ortho60/config.h index acfc2b53a..7e3ef879b 100644 --- a/keyboards/cannonkeys/ortho60/config.h +++ b/keyboards/cannonkeys/ortho60/config.h | |||
@@ -52,14 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
52 | #define LOCKING_RESYNC_ENABLE | 52 | #define LOCKING_RESYNC_ENABLE |
53 | 53 | ||
54 | #define RGBLIGHT_ANIMATIONS | 54 | #define RGBLIGHT_ANIMATIONS |
55 | 55 | #define RGB_DI_PIN B15 | |
56 | #define WS2812_LED_N 16 | 56 | #define RGBLED_NUM 16 |
57 | #define RGBLED_NUM WS2812_LED_N | ||
58 | #define PORT_WS2812 GPIOB | ||
59 | #define PIN_WS2812 15 | ||
60 | #define WS2812_SPI SPID2 | 57 | #define WS2812_SPI SPID2 |
61 | 58 | ||
62 | |||
63 | /* | 59 | /* |
64 | * Feature disable options | 60 | * Feature disable options |
65 | * These options are also useful to firmware size reduction. | 61 | * These options are also useful to firmware size reduction. |
diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index 7355fbf93..aaa14c2db 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk | |||
@@ -22,6 +22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | |||
22 | NKRO_ENABLE = yes # USB Nkey Rollover | 22 | NKRO_ENABLE = yes # USB Nkey Rollover |
23 | BACKLIGHT_ENABLE = yes | 23 | BACKLIGHT_ENABLE = yes |
24 | RGBLIGHT_ENABLE = yes | 24 | RGBLIGHT_ENABLE = yes |
25 | WS2812_DRIVER = spi | ||
25 | 26 | ||
26 | LAYOUTS = ortho_5x12 | 27 | LAYOUTS = ortho_5x12 |
27 | 28 | ||
diff --git a/keyboards/cannonkeys/ortho75/config.h b/keyboards/cannonkeys/ortho75/config.h index 6e3651a83..8c1882e65 100644 --- a/keyboards/cannonkeys/ortho75/config.h +++ b/keyboards/cannonkeys/ortho75/config.h | |||
@@ -55,14 +55,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
55 | #define LOCKING_RESYNC_ENABLE | 55 | #define LOCKING_RESYNC_ENABLE |
56 | 56 | ||
57 | #define RGBLIGHT_ANIMATIONS | 57 | #define RGBLIGHT_ANIMATIONS |
58 | 58 | #define RGB_DI_PIN B15 | |
59 | #define WS2812_LED_N 16 | 59 | #define RGBLED_NUM 16 |
60 | #define RGBLED_NUM WS2812_LED_N | ||
61 | #define PORT_WS2812 GPIOB | ||
62 | #define PIN_WS2812 15 | ||
63 | #define WS2812_SPI SPID2 | 60 | #define WS2812_SPI SPID2 |
64 | 61 | ||
65 | |||
66 | /* | 62 | /* |
67 | * Feature disable options | 63 | * Feature disable options |
68 | * These options are also useful to firmware size reduction. | 64 | * These options are also useful to firmware size reduction. |
diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index 8acb50d0c..fe9cec84c 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk | |||
@@ -22,6 +22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | |||
22 | NKRO_ENABLE = yes # USB Nkey Rollover | 22 | NKRO_ENABLE = yes # USB Nkey Rollover |
23 | BACKLIGHT_ENABLE = yes | 23 | BACKLIGHT_ENABLE = yes |
24 | RGBLIGHT_ENABLE = yes | 24 | RGBLIGHT_ENABLE = yes |
25 | WS2812_DRIVER = spi | ||
25 | ENCODER_ENABLE = yes | 26 | ENCODER_ENABLE = yes |
26 | 27 | ||
27 | LAYOUTS = ortho_5x15 | 28 | LAYOUTS = ortho_5x15 |
diff --git a/keyboards/cannonkeys/practice60/config.h b/keyboards/cannonkeys/practice60/config.h index ec16e39b3..d17b7f04d 100644 --- a/keyboards/cannonkeys/practice60/config.h +++ b/keyboards/cannonkeys/practice60/config.h | |||
@@ -52,14 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
52 | #define LOCKING_RESYNC_ENABLE | 52 | #define LOCKING_RESYNC_ENABLE |
53 | 53 | ||
54 | #define RGBLIGHT_ANIMATIONS | 54 | #define RGBLIGHT_ANIMATIONS |
55 | 55 | #define RGB_DI_PIN B15 | |
56 | #define WS2812_LED_N 9 | 56 | #define RGBLED_NUM 9 |
57 | #define RGBLED_NUM WS2812_LED_N | ||
58 | #define PORT_WS2812 GPIOB | ||
59 | #define PIN_WS2812 15 | ||
60 | #define WS2812_SPI SPID2 | 57 | #define WS2812_SPI SPID2 |
61 | 58 | ||
62 | |||
63 | /* | 59 | /* |
64 | * Feature disable options | 60 | * Feature disable options |
65 | * These options are also useful to firmware size reduction. | 61 | * These options are also useful to firmware size reduction. |
diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index 0eacb9c7b..395913736 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk | |||
@@ -22,6 +22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | |||
22 | NKRO_ENABLE = yes # USB Nkey Rollover | 22 | NKRO_ENABLE = yes # USB Nkey Rollover |
23 | BACKLIGHT_ENABLE = yes | 23 | BACKLIGHT_ENABLE = yes |
24 | RGBLIGHT_ENABLE = yes | 24 | RGBLIGHT_ENABLE = yes |
25 | WS2812_DRIVER = spi | ||
25 | 26 | ||
26 | LAYOUTS = 60_ansi | 27 | LAYOUTS = 60_ansi |
27 | 28 | ||
diff --git a/keyboards/cannonkeys/practice65/config.h b/keyboards/cannonkeys/practice65/config.h index 346af8ff3..d08d92e4c 100644 --- a/keyboards/cannonkeys/practice65/config.h +++ b/keyboards/cannonkeys/practice65/config.h | |||
@@ -52,14 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
52 | #define LOCKING_RESYNC_ENABLE | 52 | #define LOCKING_RESYNC_ENABLE |
53 | 53 | ||
54 | #define RGBLIGHT_ANIMATIONS | 54 | #define RGBLIGHT_ANIMATIONS |
55 | 55 | #define RGB_DI_PIN B15 | |
56 | #define WS2812_LED_N 20 | 56 | #define RGBLED_NUM 20 |
57 | #define RGBLED_NUM WS2812_LED_N | ||
58 | #define PORT_WS2812 GPIOB | ||
59 | #define PIN_WS2812 15 | ||
60 | #define WS2812_SPI SPID2 | 57 | #define WS2812_SPI SPID2 |
61 | 58 | ||
62 | |||
63 | /* | 59 | /* |
64 | * Feature disable options | 60 | * Feature disable options |
65 | * These options are also useful to firmware size reduction. | 61 | * These options are also useful to firmware size reduction. |
diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index 90a339bb3..d6d2b3fe7 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk | |||
@@ -22,7 +22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | |||
22 | NKRO_ENABLE = yes # USB Nkey Rollover | 22 | NKRO_ENABLE = yes # USB Nkey Rollover |
23 | BACKLIGHT_ENABLE = yes | 23 | BACKLIGHT_ENABLE = yes |
24 | RGBLIGHT_ENABLE = yes | 24 | RGBLIGHT_ENABLE = yes |
25 | 25 | WS2812_DRIVER = spi | |
26 | 26 | ||
27 | # Enter lower-power sleep mode when on the ChibiOS idle thread | 27 | # Enter lower-power sleep mode when on the ChibiOS idle thread |
28 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | 28 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE |
diff --git a/keyboards/cannonkeys/savage65/config.h b/keyboards/cannonkeys/savage65/config.h index 0839c0111..9c4dbdec4 100644 --- a/keyboards/cannonkeys/savage65/config.h +++ b/keyboards/cannonkeys/savage65/config.h | |||
@@ -49,11 +49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | #define LOCKING_RESYNC_ENABLE | 49 | #define LOCKING_RESYNC_ENABLE |
50 | 50 | ||
51 | #define RGBLIGHT_ANIMATIONS | 51 | #define RGBLIGHT_ANIMATIONS |
52 | 52 | #define RGB_DI_PIN B15 | |
53 | #define WS2812_LED_N 20 | 53 | #define RGBLED_NUM 20 |
54 | #define RGBLED_NUM WS2812_LED_N | ||
55 | #define PORT_WS2812 GPIOB | ||
56 | #define PIN_WS2812 15 | ||
57 | #define WS2812_SPI SPID2 | 54 | #define WS2812_SPI SPID2 |
58 | 55 | ||
59 | // Backlight config starts after VIA's EEPROM usage, | 56 | // Backlight config starts after VIA's EEPROM usage, |
diff --git a/keyboards/cannonkeys/savage65/rules.mk b/keyboards/cannonkeys/savage65/rules.mk index bf4b9a289..86f6b4e0f 100644 --- a/keyboards/cannonkeys/savage65/rules.mk +++ b/keyboards/cannonkeys/savage65/rules.mk | |||
@@ -21,7 +21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover | |||
21 | CUSTOM_MATRIX = no # Custom matrix file | 21 | CUSTOM_MATRIX = no # Custom matrix file |
22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason | 22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason |
23 | RGBLIGHT_ENABLE = yes | 23 | RGBLIGHT_ENABLE = yes |
24 | 24 | WS2812_DRIVER = spi | |
25 | 25 | ||
26 | # Enter lower-power sleep mode when on the ChibiOS idle thread | 26 | # Enter lower-power sleep mode when on the ChibiOS idle thread |
27 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | 27 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE |
diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c index fdda018fc..39f912506 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.c +++ b/keyboards/cannonkeys/stm32f072/keyboard.c | |||
@@ -5,8 +5,6 @@ | |||
5 | #include "util.h" | 5 | #include "util.h" |
6 | #include "quantum.h" | 6 | #include "quantum.h" |
7 | 7 | ||
8 | #include "ws2812.h" | ||
9 | |||
10 | #include "raw_hid.h" | 8 | #include "raw_hid.h" |
11 | #include "dynamic_keymap.h" | 9 | #include "dynamic_keymap.h" |
12 | #include "tmk_core/common/eeprom.h" | 10 | #include "tmk_core/common/eeprom.h" |
@@ -58,25 +56,11 @@ void matrix_init_kb(void){ | |||
58 | via_init_kb(); | 56 | via_init_kb(); |
59 | via_eeprom_set_valid(true); | 57 | via_eeprom_set_valid(true); |
60 | #endif // VIA_ENABLE | 58 | #endif // VIA_ENABLE |
61 | /* MOSI pin*/ | ||
62 | #ifdef RGBLIGHT_ENABLE | ||
63 | palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); | ||
64 | wait_ms(500); | ||
65 | leds_init(); | ||
66 | #endif | ||
67 | backlight_init_ports(); | 59 | backlight_init_ports(); |
68 | 60 | ||
69 | matrix_init_board(); | 61 | matrix_init_board(); |
70 | } | 62 | } |
71 | 63 | ||
72 | void matrix_scan_kb(void) | ||
73 | { | ||
74 | #ifdef RGBLIGHT_ENABLE | ||
75 | rgblight_task(); | ||
76 | #endif | ||
77 | matrix_scan_user(); | ||
78 | } | ||
79 | |||
80 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | 64 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { |
81 | switch (keycode) { | 65 | switch (keycode) { |
82 | case BL_INC: | 66 | case BL_INC: |
diff --git a/keyboards/cannonkeys/stm32f072/ws2812.h b/keyboards/cannonkeys/stm32f072/ws2812.h deleted file mode 100644 index 9b545fcd5..000000000 --- a/keyboards/cannonkeys/stm32f072/ws2812.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "hal.h" | ||
4 | #include "color.h" | ||
5 | |||
6 | void set_leds_color_rgb(LED_TYPE color); | ||
7 | void set_led_color_rgb(LED_TYPE color, int pos); | ||
8 | void leds_init(void); | ||
9 | |||
10 | |||
11 | // This is what users will use to interface with this | ||
12 | void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); | ||
13 | void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); | ||
14 | |||
15 | |||
16 | void WS2812_init(void); | ||
17 | void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue ); | ||
18 | void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); | ||
19 | void WS2812_send_colors(void); | ||
diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h index d8d95ae55..ef8d768f6 100644 --- a/keyboards/cannonkeys/tmov2/config.h +++ b/keyboards/cannonkeys/tmov2/config.h | |||
@@ -49,12 +49,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | #define LOCKING_RESYNC_ENABLE | 49 | #define LOCKING_RESYNC_ENABLE |
50 | 50 | ||
51 | #define RGBLIGHT_ANIMATIONS | 51 | #define RGBLIGHT_ANIMATIONS |
52 | 52 | #define RGB_DI_PIN B15 | |
53 | #define WS2812_LED_N 22 | 53 | #define RGBLED_NUM 22 |
54 | #define RGBLED_NUM WS2812_LED_N | ||
55 | #define PORT_WS2812 GPIOB | ||
56 | #define PIN_WS2812 15 | ||
57 | #define WS2812_SPI SPID2 | 54 | #define WS2812_SPI SPID2 |
55 | #define WS2812_SPI_MOSI_PAL_MODE 0 | ||
58 | 56 | ||
59 | // Backlight config starts after VIA's EEPROM usage, | 57 | // Backlight config starts after VIA's EEPROM usage, |
60 | // dynamic keymaps start after this. | 58 | // dynamic keymaps start after this. |
diff --git a/keyboards/cannonkeys/tmov2/rules.mk b/keyboards/cannonkeys/tmov2/rules.mk index 7d29079c3..686970ef8 100644 --- a/keyboards/cannonkeys/tmov2/rules.mk +++ b/keyboards/cannonkeys/tmov2/rules.mk | |||
@@ -21,7 +21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover | |||
21 | CUSTOM_MATRIX = no # Custom matrix file | 21 | CUSTOM_MATRIX = no # Custom matrix file |
22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 right now | 22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 right now |
23 | RGBLIGHT_ENABLE = yes | 23 | RGBLIGHT_ENABLE = yes |
24 | 24 | WS2812_DRIVER = spi | |
25 | 25 | ||
26 | # Enter lower-power sleep mode when on the ChibiOS idle thread | 26 | # Enter lower-power sleep mode when on the ChibiOS idle thread |
27 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | 27 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE |
diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h index 262abdeb1..61648dc7d 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/config.h | |||
@@ -49,11 +49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | #define LOCKING_RESYNC_ENABLE | 49 | #define LOCKING_RESYNC_ENABLE |
50 | 50 | ||
51 | #define RGBLIGHT_ANIMATIONS | 51 | #define RGBLIGHT_ANIMATIONS |
52 | 52 | #define RGB_DI_PIN B15 | |
53 | #define WS2812_LED_N 14 | 53 | #define RGBLED_NUM 14 |
54 | #define RGBLED_NUM WS2812_LED_N | ||
55 | #define PORT_WS2812 GPIOB | ||
56 | #define PIN_WS2812 15 | ||
57 | #define WS2812_SPI SPID2 | 54 | #define WS2812_SPI SPID2 |
58 | 55 | ||
59 | // Backlight config starts after VIA's EEPROM usage, | 56 | // Backlight config starts after VIA's EEPROM usage, |
diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index 503bc7ad7..3bb6531af 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk | |||
@@ -21,6 +21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover | |||
21 | CUSTOM_MATRIX = no # Custom matrix file | 21 | CUSTOM_MATRIX = no # Custom matrix file |
22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason | 22 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason |
23 | RGBLIGHT_ENABLE = yes | 23 | RGBLIGHT_ENABLE = yes |
24 | WS2812_DRIVER = spi | ||
24 | 25 | ||
25 | # RAW_ENABLE = yes | 26 | # RAW_ENABLE = yes |
26 | # DYNAMIC_KEYMAP_ENABLE = yes | 27 | # DYNAMIC_KEYMAP_ENABLE = yes |