summaryrefslogtreecommitdiff
path: root/keyboards/matrix/m20add
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/m20add
parent0379d1f59e58cefa18cdb72ba1b77507d1108ae6 (diff)
parent4d99e0a23cff02f4c6e55e093b5de08a9be0df7c (diff)
`develop` -> `master`, 2023q4 edition
Diffstat (limited to 'keyboards/matrix/m20add')
-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
4 files changed, 9 insertions, 20 deletions
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