1
0
Fork 0

aw20216: driver naming cleanups (#21891)

This commit is contained in:
Ryan 2023-09-13 22:45:17 +10:00 committed by GitHub
parent b9f2121d10
commit a0aebe5cd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 292 additions and 262 deletions

View file

@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location

View file

@ -12,7 +12,7 @@
"tap_keycode_delay": 10
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],

View file

@ -29,12 +29,12 @@
#define SPI_MOSI_PIN B15
#define SPI_MISO_PIN B14
#define DRIVER_1_CS A15
#define DRIVER_2_CS B9
#define DRIVER_1_EN C13
#define DRIVER_2_EN C13
#define AW20216S_DRIVER_1_CS A15
#define AW20216S_DRIVER_2_CS B9
#define AW20216S_DRIVER_1_EN C13
#define AW20216S_DRIVER_2_EN C13
#define DRIVER_COUNT 2
#define AW20216S_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 54
#define DRIVER_2_LED_TOTAL 34
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

View file

@ -12,7 +12,7 @@
"tap_keycode_delay": 10
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],

View file

@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location

View file

@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location

View file

@ -12,7 +12,7 @@
"tap_keycode_delay": 10
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],

View file

@ -33,12 +33,12 @@
#define SPI_MOSI_PIN A7
#define SPI_MISO_PIN A6
#define DRIVER_1_CS A15
#define DRIVER_2_CS B15
#define DRIVER_1_EN C13
#define DRIVER_2_EN C13
#define AW20216S_DRIVER_1_CS A15
#define AW20216S_DRIVER_2_CS B15
#define AW20216S_DRIVER_1_EN C13
#define AW20216S_DRIVER_2_EN C13
#define DRIVER_COUNT 2
#define AW20216S_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 66
#define DRIVER_2_LED_TOTAL 54
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

View file

@ -12,7 +12,7 @@
"tap_keycode_delay": 10
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],

View file

@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location

View file

@ -28,11 +28,11 @@
#define SPI_MOSI_PIN B5
#define SPI_MISO_PIN B4
#define DRIVER_1_CS B12
#define DRIVER_1_EN A15
#define DRIVER_1_PW_EN B13
#define AW20216S_DRIVER_1_CS B12
#define AW20216S_DRIVER_1_EN A15
#define AW20216S_DRIVER_1_PW_EN B13
#define DRIVER_COUNT 1
#define AW20216S_DRIVER_COUNT 1
#define RGB_MATRIX_LED_COUNT 31

View file

@ -20,7 +20,7 @@
]
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"processor": "WB32F3G71",
"bootloader": "wb32-dfu",

View file

@ -19,10 +19,10 @@
#ifdef RGB_MATRIX_ENABLE
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
/* Each AW20216 channel is controlled by a register at some offset between 0x00
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
/* Each AW20216S channel is controlled by a register at some offset between 0x00
* and 0xD7 inclusive.
* See drivers/awinic/aw20216.h for the mapping between register offsets and
* See drivers/led/aw20216s.h for the mapping between register offsets and
* driver pin locations.
* driver
* | R location
@ -110,12 +110,12 @@ led_config_t g_led_config = {{
2, 2, 2, 2, 2, 2, 2
} };
# ifdef DRIVER_1_PW_EN
# ifdef AW20216S_DRIVER_1_PW_EN
void keyboard_pre_init_user(void) {
wait_ms(2000);
setPinOutput(DRIVER_1_PW_EN);
writePinHigh(DRIVER_1_PW_EN);
setPinOutput(AW20216S_DRIVER_1_PW_EN);
writePinHigh(AW20216S_DRIVER_1_PW_EN);
}
# endif

View file

@ -26,12 +26,12 @@
#define SPI_MOSI_PIN A6
#define SPI_MISO_PIN A7
#define DRIVER_1_CS B13
#define DRIVER_2_CS B14
#define DRIVER_1_EN C13
#define DRIVER_2_EN C13
#define AW20216S_DRIVER_1_CS B13
#define AW20216S_DRIVER_2_CS B14
#define AW20216S_DRIVER_1_EN C13
#define AW20216S_DRIVER_2_EN C13
#define DRIVER_COUNT 2
#define AW20216S_DRIVER_COUNT 2
#define RGB_DISABLE_WHEN_USB_SUSPENDED

View file

@ -136,7 +136,7 @@ led_config_t g_led_config = {{
4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11

View file

@ -9,7 +9,7 @@
"device_version": "0.0.1"
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],

View file

@ -136,7 +136,7 @@ led_config_t PROGMEM g_led_config = {{
4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11

View file

@ -9,7 +9,7 @@
"device_version": "0.0.1"
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],

View file

@ -137,7 +137,7 @@ led_config_t g_led_config = {{
2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11

View file

@ -136,7 +136,7 @@ led_config_t g_led_config = {{
4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11

View file

@ -9,7 +9,7 @@
"device_version": "0.0.2"
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],

View file

@ -9,7 +9,7 @@
"device_version": "0.0.2"
},
"rgb_matrix": {
"driver": "aw20216"
"driver": "aw20216s"
},
"matrix_pins": {
"cols": ["A0", "A1", "A2", "A3", "A4", "A8", "A9", "A10"],

View file

@ -137,7 +137,7 @@ led_config_t g_led_config = {{
2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
}};
const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = {
const aw20216s_led g_aw20216s_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11