Rename RGBW define to WS2812_RGBW (#23585)
				
					
				
			This commit is contained in:
		
							parent
							
								
									8f8fffc174
								
							
						
					
					
						commit
						0ff53b2498
					
				
					 24 changed files with 68 additions and 44 deletions
				
			
		| 
						 | 
				
			
			@ -73,8 +73,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		|||
/* fix space cadet rollover issue */
 | 
			
		||||
#define DISABLE_SPACE_CADET_ROLLOVER
 | 
			
		||||
 | 
			
		||||
#define RGBW
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * The debounce filtering reports a key/switch change directly,
 | 
			
		||||
 * without any extra delay. After that the debounce logic will filter
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,8 @@
 | 
			
		|||
        "debounce_type": "sym_eager_pr"
 | 
			
		||||
    },
 | 
			
		||||
    "ws2812": {
 | 
			
		||||
        "pin": "D7"
 | 
			
		||||
        "pin": "D7",
 | 
			
		||||
        "rgbw": true
 | 
			
		||||
    },
 | 
			
		||||
    "rgb_matrix": {
 | 
			
		||||
        "animations": {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,7 +25,7 @@ void setleds_custom(rgb_led_t *led, uint16_t led_num) {
 | 
			
		|||
    uint16_t length = 0;
 | 
			
		||||
    int i = 0;
 | 
			
		||||
    int j = 0;
 | 
			
		||||
#    ifdef RGBW
 | 
			
		||||
#    ifdef WS2812_RGBW
 | 
			
		||||
    int bytes_per_led = 4;
 | 
			
		||||
#    else
 | 
			
		||||
    int bytes_per_led = 3;
 | 
			
		||||
| 
						 | 
				
			
			@ -52,7 +52,7 @@ void setleds_custom(rgb_led_t *led, uint16_t led_num) {
 | 
			
		|||
        data[j++] = data_byte[0];
 | 
			
		||||
        data[j++] = data_byte[1];
 | 
			
		||||
        data[j++] = data_byte[2];
 | 
			
		||||
#ifdef RGBW
 | 
			
		||||
#ifdef WS2812_RGBW
 | 
			
		||||
        data[j++] = data_byte[3];
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,8 +17,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		|||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#define RGBW
 | 
			
		||||
 | 
			
		||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
 | 
			
		||||
#define LOCKING_SUPPORT_ENABLE
 | 
			
		||||
/* Locking resynchronize hack */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,8 @@
 | 
			
		|||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "ws2812": {
 | 
			
		||||
        "pin": "D1"
 | 
			
		||||
        "pin": "D1",
 | 
			
		||||
        "rgbw": true
 | 
			
		||||
    },
 | 
			
		||||
    "features": {
 | 
			
		||||
        "bootmagic": true,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
#include "ws2812.h"
 | 
			
		||||
#include "i2c_master.h"
 | 
			
		||||
 | 
			
		||||
#ifdef RGBW
 | 
			
		||||
#ifdef WS2812_RGBW
 | 
			
		||||
#    error "RGBW not supported"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) {
 | 
			
		|||
        rgb_matrix_ws2812_array[i].g = g;
 | 
			
		||||
        rgb_matrix_ws2812_array[i].b = b;
 | 
			
		||||
    }
 | 
			
		||||
#        ifdef RGBW
 | 
			
		||||
#        ifdef WS2812_RGBW
 | 
			
		||||
    convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]);
 | 
			
		||||
#        endif
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,8 +17,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		|||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#define RGBW
 | 
			
		||||
 | 
			
		||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
 | 
			
		||||
#define LOCKING_SUPPORT_ENABLE
 | 
			
		||||
/* Locking resynchronize hack */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,7 +52,8 @@
 | 
			
		|||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "ws2812": {
 | 
			
		||||
    "pin": "E6"
 | 
			
		||||
    "pin": "E6",
 | 
			
		||||
    "rgbw": true
 | 
			
		||||
  },
 | 
			
		||||
  "processor": "atmega32u4",
 | 
			
		||||
  "bootloader": "atmel-dfu",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue