M keyboards/cannonkeys/an_c/config.h => keyboards/cannonkeys/an_c/config.h +2 -5
@@ 49,11 49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 14
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 14
#define WS2812_SPI SPID2
// Backlight config starts after VIA's EEPROM usage,
M keyboards/cannonkeys/an_c/rules.mk => keyboards/cannonkeys/an_c/rules.mk +1 -0
@@ 21,6 21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = spi
LAYOUTS = 60_ansi 60_tsangan_hhkb
M keyboards/cannonkeys/bluepill/keyboard.c => keyboards/cannonkeys/bluepill/keyboard.c +0 -13
@@ 14,20 14,7 @@
#endif
void matrix_init_kb(void){
- /* MOSI pin*/
- palSetPadMode(GPIOB, 15, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
LED_ON();
wait_ms(500);
LED_OFF();
-
-#ifdef RGBLIGHT_ENABLE
- leds_init();
-#endif
-}
-
-void matrix_scan_kb(void)
-{
- #ifdef RGBLIGHT_ENABLE
- rgblight_task();
- #endif
}
D keyboards/cannonkeys/bluepill/ws2812.h => keyboards/cannonkeys/bluepill/ws2812.h +0 -20
@@ 1,20 0,0 @@
-#pragma once
-
-#include "hal.h"
-#include "color.h"
-
-
-void set_leds_color_rgb(LED_TYPE color);
-void set_led_color_rgb(LED_TYPE color, int pos);
-void leds_init(void);
-
-
- // This is what users will use to interface with this
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
-void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
-
-
-void WS2812_init(void);
-void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue );
-void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue );
-void WS2812_send_colors(void);
M keyboards/cannonkeys/instant60/config.h => keyboards/cannonkeys/instant60/config.h +2 -5
@@ 49,11 49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 14
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 14
#define WS2812_SPI SPID2
// Backlight config starts after VIA's EEPROM usage,
M keyboards/cannonkeys/instant60/rules.mk => keyboards/cannonkeys/instant60/rules.mk +1 -0
@@ 21,6 21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = spi
LAYOUTS = 60_ansi 60_tsangan_hhkb
M keyboards/cannonkeys/ortho48/config.h => keyboards/cannonkeys/ortho48/config.h +2 -6
@@ 52,14 52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 9
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 9
#define WS2812_SPI SPID2
-
/*
* Feature disable options
* These options are also useful to firmware size reduction.
M keyboards/cannonkeys/ortho48/rules.mk => keyboards/cannonkeys/ortho48/rules.mk +1 -0
@@ 22,6 22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = spi
LAYOUTS = ortho_4x12
M keyboards/cannonkeys/ortho60/config.h => keyboards/cannonkeys/ortho60/config.h +2 -6
@@ 52,14 52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 16
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 16
#define WS2812_SPI SPID2
-
/*
* Feature disable options
* These options are also useful to firmware size reduction.
M keyboards/cannonkeys/ortho60/rules.mk => keyboards/cannonkeys/ortho60/rules.mk +1 -0
@@ 22,6 22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = spi
LAYOUTS = ortho_5x12
M keyboards/cannonkeys/ortho75/config.h => keyboards/cannonkeys/ortho75/config.h +2 -6
@@ 55,14 55,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 16
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 16
#define WS2812_SPI SPID2
-
/*
* Feature disable options
* These options are also useful to firmware size reduction.
M keyboards/cannonkeys/ortho75/rules.mk => keyboards/cannonkeys/ortho75/rules.mk +1 -0
@@ 22,6 22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = spi
ENCODER_ENABLE = yes
LAYOUTS = ortho_5x15
M keyboards/cannonkeys/practice60/config.h => keyboards/cannonkeys/practice60/config.h +2 -6
@@ 52,14 52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 9
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 9
#define WS2812_SPI SPID2
-
/*
* Feature disable options
* These options are also useful to firmware size reduction.
M keyboards/cannonkeys/practice60/rules.mk => keyboards/cannonkeys/practice60/rules.mk +1 -0
@@ 22,6 22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = spi
LAYOUTS = 60_ansi
M keyboards/cannonkeys/practice65/config.h => keyboards/cannonkeys/practice65/config.h +2 -6
@@ 52,14 52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 20
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 20
#define WS2812_SPI SPID2
-
/*
* Feature disable options
* These options are also useful to firmware size reduction.
M keyboards/cannonkeys/practice65/rules.mk => keyboards/cannonkeys/practice65/rules.mk +1 -1
@@ 22,7 22,7 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
-
+WS2812_DRIVER = spi
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
M keyboards/cannonkeys/savage65/config.h => keyboards/cannonkeys/savage65/config.h +2 -5
@@ 49,11 49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 20
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 20
#define WS2812_SPI SPID2
// Backlight config starts after VIA's EEPROM usage,
M keyboards/cannonkeys/savage65/rules.mk => keyboards/cannonkeys/savage65/rules.mk +1 -1
@@ 21,7 21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
RGBLIGHT_ENABLE = yes
-
+WS2812_DRIVER = spi
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
M keyboards/cannonkeys/stm32f072/keyboard.c => keyboards/cannonkeys/stm32f072/keyboard.c +0 -16
@@ 5,8 5,6 @@
#include "util.h"
#include "quantum.h"
-#include "ws2812.h"
-
#include "raw_hid.h"
#include "dynamic_keymap.h"
#include "tmk_core/common/eeprom.h"
@@ 58,25 56,11 @@ void matrix_init_kb(void){
via_init_kb();
via_eeprom_set_valid(true);
#endif // VIA_ENABLE
- /* MOSI pin*/
-#ifdef RGBLIGHT_ENABLE
- palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0));
- wait_ms(500);
- leds_init();
-#endif
backlight_init_ports();
matrix_init_board();
}
-void matrix_scan_kb(void)
-{
- #ifdef RGBLIGHT_ENABLE
- rgblight_task();
- #endif
- matrix_scan_user();
-}
-
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BL_INC:
D keyboards/cannonkeys/stm32f072/ws2812.h => keyboards/cannonkeys/stm32f072/ws2812.h +0 -19
@@ 1,19 0,0 @@
-#pragma once
-
-#include "hal.h"
-#include "color.h"
-
-void set_leds_color_rgb(LED_TYPE color);
-void set_led_color_rgb(LED_TYPE color, int pos);
-void leds_init(void);
-
-
- // This is what users will use to interface with this
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
-void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
-
-
-void WS2812_init(void);
-void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue );
-void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue );
-void WS2812_send_colors(void);
M keyboards/cannonkeys/tmov2/config.h => keyboards/cannonkeys/tmov2/config.h +3 -5
@@ 49,12 49,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 22
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 22
#define WS2812_SPI SPID2
+#define WS2812_SPI_MOSI_PAL_MODE 0
// Backlight config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
M keyboards/cannonkeys/tmov2/rules.mk => keyboards/cannonkeys/tmov2/rules.mk +1 -1
@@ 21,7 21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 right now
RGBLIGHT_ENABLE = yes
-
+WS2812_DRIVER = spi
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
M keyboards/projectkb/alice/config.h => keyboards/projectkb/alice/config.h +2 -5
@@ 49,11 49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_RESYNC_ENABLE
#define RGBLIGHT_ANIMATIONS
-
-#define WS2812_LED_N 14
-#define RGBLED_NUM WS2812_LED_N
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 15
+#define RGB_DI_PIN B15
+#define RGBLED_NUM 14
#define WS2812_SPI SPID2
// Backlight config starts after VIA's EEPROM usage,
M keyboards/projectkb/alice/rules.mk => keyboards/projectkb/alice/rules.mk +1 -0
@@ 21,6 21,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = no # Custom matrix file
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = spi
# RAW_ENABLE = yes
# DYNAMIC_KEYMAP_ENABLE = yes