Add init function to RGBLight driver struct (#23076)
This commit is contained in:
		
							parent
							
								
									23b7a02ebe
								
							
						
					
					
						commit
						f7cf40fa77
					
				
					 42 changed files with 306 additions and 93 deletions
				
			
		| 
						 | 
				
			
			@ -1,8 +1,15 @@
 | 
			
		|||
#include "keyboard.h"
 | 
			
		||||
#include "ws2812.h"
 | 
			
		||||
#include "rgbsps.h"
 | 
			
		||||
 | 
			
		||||
rgb_led_t led[RGBSPS_NUM];
 | 
			
		||||
 | 
			
		||||
void keyboard_pre_init_kb(void) {
 | 
			
		||||
  ws2812_init();
 | 
			
		||||
 | 
			
		||||
  keyboard_pre_init_user();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b) {
 | 
			
		||||
  led[index].r = r;
 | 
			
		||||
  led[index].g = g;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue