Infer LED DRIVER_COUNT from configured addresses (#22311)
This commit is contained in:
		
							parent
							
								
									8136cf4bfb
								
							
						
					
					
						commit
						84df69572c
					
				
					 18 changed files with 138 additions and 57 deletions
				
			
		| 
						 | 
				
			
			@ -23,9 +23,6 @@
 | 
			
		|||
#include "util.h"
 | 
			
		||||
 | 
			
		||||
// ======== DEPRECATED DEFINES - DO NOT USE ========
 | 
			
		||||
#ifdef DRIVER_COUNT
 | 
			
		||||
#    define AW20216S_DRIVER_COUNT DRIVER_COUNT
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef AW_SCALING_MAX
 | 
			
		||||
#    define AW20216S_SCALING_MAX AW_SCALING_MAX
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -59,6 +56,12 @@
 | 
			
		|||
#    define AW20216S_LED_COUNT RGB_MATRIX_LED_COUNT
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(AW20216S_CS_PIN_2)
 | 
			
		||||
#    define AW20216S_DRIVER_COUNT 2
 | 
			
		||||
#elif defined(AW20216S_CS_PIN_1)
 | 
			
		||||
#    define AW20216S_DRIVER_COUNT 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct aw20216s_led_t {
 | 
			
		||||
    uint8_t driver : 2;
 | 
			
		||||
    uint8_t r;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue