diff options
Diffstat (limited to 'drivers/led/aw20216s.h')
-rw-r--r-- | drivers/led/aw20216s.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/led/aw20216s.h b/drivers/led/aw20216s.h index d79d632084..38a0c92b2f 100644 --- a/drivers/led/aw20216s.h +++ b/drivers/led/aw20216s.h @@ -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 |