summaryrefslogtreecommitdiff
path: root/keyboards/matrix
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-11-28 16:39:48 +1100
committerNick Brassel <nick@tzarc.org>2023-11-28 16:40:47 +1100
commit0115951de12bd4c798a43a380651c34552552e85 (patch)
tree62999011ae782d93aa6dc9c889615db2a840cafc /keyboards/matrix
parent0379d1f59e58cefa18cdb72ba1b77507d1108ae6 (diff)
parent4d99e0a23cff02f4c6e55e093b5de08a9be0df7c (diff)
`develop` -> `master`, 2023q4 edition
Diffstat (limited to 'keyboards/matrix')
-rw-r--r--keyboards/matrix/abelx/abelx.c9
-rw-r--r--keyboards/matrix/abelx/rules.mk2
-rw-r--r--keyboards/matrix/m20add/config.h5
-rw-r--r--keyboards/matrix/m20add/m20add.c8
-rw-r--r--keyboards/matrix/m20add/rgb_ring.c14
-rw-r--r--keyboards/matrix/m20add/rules.mk2
-rw-r--r--keyboards/matrix/noah/config.h5
-rw-r--r--keyboards/matrix/noah/noah.c4
8 files changed, 16 insertions, 33 deletions
diff --git a/keyboards/matrix/abelx/abelx.c b/keyboards/matrix/abelx/abelx.c
index 9585948e0c..a05934238a 100644
--- a/keyboards/matrix/abelx/abelx.c
+++ b/keyboards/matrix/abelx/abelx.c
@@ -66,7 +66,7 @@ const aw9523b_led g_aw9523b_leds[AW9523B_RGB_NUM] = {
{AW9523B_P07_PWM, AW9523B_P06_PWM, AW9523B_P05_PWM},
};
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
{
uint8_t num = num_leds < AW9523B_RGB_NUM ? num_leds : AW9523B_RGB_NUM;
@@ -92,13 +92,8 @@ bool led_update_kb(led_t led_state) {
}
#define REBOOT_MAGIC 0x41544B42
-void shutdown_user(void)
-{
- // set the magic number for resetting to the bootloader
- *(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
-}
void bootloader_jump(void) {
- shutdown_user();
+ *(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
NVIC_SystemReset();
}
diff --git a/keyboards/matrix/abelx/rules.mk b/keyboards/matrix/abelx/rules.mk
index 7a5d01e5cb..1c2fc05ffe 100644
--- a/keyboards/matrix/abelx/rules.mk
+++ b/keyboards/matrix/abelx/rules.mk
@@ -45,4 +45,4 @@ NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in
CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c tca6424.c aw9523b.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h
index 8d4c69bb9c..f79cbb123b 100644
--- a/keyboards/matrix/m20add/config.h
+++ b/keyboards/matrix/m20add/config.h
@@ -78,6 +78,5 @@
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_COUNT 1
-#define RGB_MATRIX_LED_COUNT 20
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_LED_COUNT 20
diff --git a/keyboards/matrix/m20add/m20add.c b/keyboards/matrix/m20add/m20add.c
index cdcafb9779..ac483e8aab 100644
--- a/keyboards/matrix/m20add/m20add.c
+++ b/keyboards/matrix/m20add/m20add.c
@@ -54,13 +54,9 @@ bool led_update_kb(led_t led_state) {
}
#define REBOOT_MAGIC 0x41544B42
-void shutdown_user(void)
-{
- // set the magic number for resetting to the bootloader
- *(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
-}
void bootloader_jump(void) {
- shutdown_user();
+ // set the magic number for resetting to the bootloader
+ *(uint32_t *)(&(RTCD1.rtc->BKP0R)) = REBOOT_MAGIC;
NVIC_SystemReset();
}
diff --git a/keyboards/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c
index 4567f0348d..f3fbe83d72 100644
--- a/keyboards/matrix/m20add/rgb_ring.c
+++ b/keyboards/matrix/m20add/rgb_ring.c
@@ -30,7 +30,7 @@
#endif
// rgb ring leds setting
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -357,7 +357,7 @@ static void custom_effects(void)
effect_funcs[rgb_ring.effect]();
}
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
+void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
{
if (rgb_ring.state != RING_STATE_QMK) {
return;
@@ -371,13 +371,7 @@ void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds)
void rgb_ring_init(void)
{
- i2c_init();
- is31fl3731_init(DRIVER_ADDR_1);
- for (int index = 0; index < RGB_MATRIX_LED_COUNT; index++) {
- bool enabled = true;
- is31fl3731_set_led_control_register(index, enabled, enabled, enabled);
- }
- is31fl3731_update_led_control_registers(DRIVER_ADDR_1, 0);
+ is31fl3731_init_drivers();
}
void rgb_ring_task(void)
@@ -396,7 +390,7 @@ void rgb_ring_task(void)
break;
};
- is31fl3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
+ is31fl3731_flush();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record)
diff --git a/keyboards/matrix/m20add/rules.mk b/keyboards/matrix/m20add/rules.mk
index 86bd6b9371..1b005b8c17 100644
--- a/keyboards/matrix/m20add/rules.mk
+++ b/keyboards/matrix/m20add/rules.mk
@@ -29,4 +29,4 @@ RGBLIGHT_ENABLE = yes
CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c tca6424.c rgb_ring.c drivers/led/issi/is31fl3731.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes
diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h
index 452fef4cee..a4d4c5a36a 100644
--- a/keyboards/matrix/noah/config.h
+++ b/keyboards/matrix/noah/config.h
@@ -19,9 +19,8 @@
#define PAL_MODE_STM32_ALTERNATE_OPENDRAIN (PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN)
// rgb matrix setting
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110110
-#define DRIVER_COUNT 2
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
diff --git a/keyboards/matrix/noah/noah.c b/keyboards/matrix/noah/noah.c
index 0969998fa9..8246da809c 100644
--- a/keyboards/matrix/noah/noah.c
+++ b/keyboards/matrix/noah/noah.c
@@ -20,7 +20,7 @@ extern rgblight_config_t rgblight_config;
#if RGBLED_NUM < 7
#error "MUST set the RGBLED_NUM bigger than 7"
#endif
-LED_TYPE noah_leds[RGBLED_NUM];
+rgb_led_t noah_leds[RGBLED_NUM];
static bool noah_led_mode = false;
void rgblight_set(void) {
memset(&noah_leds[0], 0, sizeof(noah_leds));
@@ -63,7 +63,7 @@ void matrix_scan_kb(void) {
}
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location