forked from mirrors/qmk_userspace
refactor: move default RGB/LED matrix #defines (#21938)
* refactor: move default RGB/LED matrix #defines Moving the fallback definitions of macros like LED_MATRIX_VAL_STEP and RGB_MATRIX_MAXIMUM_BRIGHTNESS to header files allows keyboards to leverage these defaults without requiring #ifdef guards (and often repeating said fallback definitions). * style: use if(n)def for consistency and remove redundant UINT8_MAX checks on maximum brightness Co-authored-by: Joel Challis <git@zvecr.com> * refactor: remove INDICATOR_MAX_BRIGHTNESS macro Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
parent
f4677c866e
commit
346b06d391
18 changed files with 103 additions and 138 deletions
|
@ -43,6 +43,34 @@
|
|||
# include "ckled2001-simple.h"
|
||||
#endif
|
||||
|
||||
#ifndef LED_MATRIX_TIMEOUT
|
||||
# define LED_MATRIX_TIMEOUT 0
|
||||
#endif
|
||||
|
||||
#ifndef LED_MATRIX_MAXIMUM_BRIGHTNESS
|
||||
# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
|
||||
#endif
|
||||
|
||||
#ifndef LED_MATRIX_VAL_STEP
|
||||
# define LED_MATRIX_VAL_STEP 8
|
||||
#endif
|
||||
|
||||
#ifndef LED_MATRIX_SPD_STEP
|
||||
# define LED_MATRIX_SPD_STEP 16
|
||||
#endif
|
||||
|
||||
#ifndef LED_MATRIX_DEFAULT_MODE
|
||||
# define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID
|
||||
#endif
|
||||
|
||||
#ifndef LED_MATRIX_DEFAULT_VAL
|
||||
# define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS
|
||||
#endif
|
||||
|
||||
#ifndef LED_MATRIX_DEFAULT_SPD
|
||||
# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2
|
||||
#endif
|
||||
|
||||
#ifndef LED_MATRIX_LED_FLUSH_LIMIT
|
||||
# define LED_MATRIX_LED_FLUSH_LIMIT 16
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue