Clean up RGB LED type (#21859)
This commit is contained in:
		
							parent
							
								
									1e3095f9cc
								
							
						
					
					
						commit
						41bd4e35a0
					
				
					 63 changed files with 222 additions and 243 deletions
				
			
		| 
						 | 
				
			
			@ -268,7 +268,7 @@ static inline void sync_ws2812_transfer(void) {
 | 
			
		|||
    busy_wait_until(LAST_TRANSFER);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) {
 | 
			
		||||
void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) {
 | 
			
		||||
    static bool is_initialized = false;
 | 
			
		||||
    if (unlikely(!is_initialized)) {
 | 
			
		||||
        is_initialized = ws2812_init();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -72,7 +72,7 @@ void ws2812_init(void) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
// Setleds for standard RGB
 | 
			
		||||
void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
 | 
			
		||||
void ws2812_setleds(rgb_led_t *ledarray, uint16_t leds) {
 | 
			
		||||
    static bool s_init = false;
 | 
			
		||||
    if (!s_init) {
 | 
			
		||||
        ws2812_init();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -379,7 +379,7 @@ void ws2812_write_led_rgbw(uint16_t led_number, uint8_t r, uint8_t g, uint8_t b,
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
// Setleds for standard RGB
 | 
			
		||||
void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) {
 | 
			
		||||
void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) {
 | 
			
		||||
    static bool s_init = false;
 | 
			
		||||
    if (!s_init) {
 | 
			
		||||
        ws2812_init();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -106,7 +106,7 @@ static uint8_t get_protocol_eq(uint8_t data, int pos) {
 | 
			
		|||
    return eq;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void set_led_color_rgb(LED_TYPE color, int pos) {
 | 
			
		||||
static void set_led_color_rgb(rgb_led_t color, int pos) {
 | 
			
		||||
    uint8_t* tx_start = &txbuf[PREAMBLE_SIZE];
 | 
			
		||||
 | 
			
		||||
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
 | 
			
		||||
| 
						 | 
				
			
			@ -187,7 +187,7 @@ void ws2812_init(void) {
 | 
			
		|||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) {
 | 
			
		||||
void ws2812_setleds(rgb_led_t* ledarray, uint16_t leds) {
 | 
			
		||||
    static bool s_init = false;
 | 
			
		||||
    if (!s_init) {
 | 
			
		||||
        ws2812_init();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue