LED drivers: register naming cleanups (#22436)

This commit is contained in:
Ryan 2023-11-21 02:48:23 +11:00 committed by GitHub
parent e279c78ba3
commit dda6e7fb36
Failed to generate hash of commit
51 changed files with 684 additions and 671 deletions

View file

@ -52,6 +52,28 @@
#define g_aw_leds g_aw20216s_leds
// ========
#define AW20216S_ID (0b1010 << 4)
#define AW20216S_WRITE 0
#define AW20216S_READ 1
#define AW20216S_PAGE_FUNCTION (0x00 << 1)
#define AW20216S_PAGE_PWM (0x01 << 1)
#define AW20216S_PAGE_SCALING (0x02 << 1)
#define AW20216S_PAGE_PATTERN_CHOICE (0x03 << 1)
#define AW20216S_PAGE_PWM_SCALING (0x04 << 1)
#define AW20216S_FUNCTION_REG_CONFIGURATION 0x00
#define AW20216S_CONFIGURATION_SWSEL_1_12 (0b1011 << 4)
#define AW20216S_CONFIGURATION_CHIPEN (0b1 << 0)
#define AW20216S_FUNCTION_REG_GLOBAL_CURRENT 0x01
#define AW20216S_FUNCTION_REG_RESET 0x2F
#define AW20216S_RESET_MAGIC 0xAE
#define AW20216S_FUNCTION_REG_MIX_FUNCTION 0x46
#define AW20216S_MIX_FUNCTION_LPEN (0b1 << 1)
#if defined(RGB_MATRIX_AW20216S)
# define AW20216S_LED_COUNT RGB_MATRIX_LED_COUNT
#endif