summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/feature_led_matrix.md2
-rw-r--r--docs/feature_rgb_matrix.md8
-rw-r--r--docs/ja/feature_led_matrix.md2
-rw-r--r--drivers/led/aw20216.h3
-rw-r--r--drivers/led/issi/is31fl3731-simple.h3
-rw-r--r--drivers/led/issi/is31fl3731.h3
-rw-r--r--drivers/led/issi/is31fl3733.h3
-rw-r--r--drivers/led/issi/is31fl3736.h3
-rw-r--r--drivers/led/issi/is31fl3737.c9
-rw-r--r--drivers/led/issi/is31fl3737.h3
-rw-r--r--drivers/led/issi/is31fl3741.h3
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/gen1.c2
-rw-r--r--keyboards/dp60/dp60.c2
-rw-r--r--keyboards/durgod/dgk6x/galaxy/galaxy.c2
-rw-r--r--keyboards/durgod/dgk6x/hades/hades.c2
-rw-r--r--keyboards/durgod/dgk6x/venus/venus.c2
-rw-r--r--keyboards/dztech/dz60rgb/dz60rgb.c2
-rw-r--r--keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c2
-rw-r--r--keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c2
-rw-r--r--keyboards/dztech/dz65rgb/v1/v1.c2
-rw-r--r--keyboards/dztech/dz65rgb/v2/v2.c2
-rwxr-xr-xkeyboards/dztech/dz65rgb/v3/v3.c2
-rw-r--r--keyboards/ergodox_ez/ergodox_ez.c2
-rw-r--r--keyboards/ergodox_infinity/ergodox_infinity.c2
-rw-r--r--keyboards/exclusive/e6_rgb/e6_rgb.c2
-rwxr-xr-xkeyboards/fallacy/indicators.c2
-rw-r--r--keyboards/geekboards/tester/tester.c2
-rw-r--r--keyboards/hs60/v1/v1.c4
-rw-r--r--keyboards/inett_studio/sqx/hotswap/hotswap.c2
-rw-r--r--keyboards/inett_studio/sqx/universal/universal.c2
-rw-r--r--keyboards/k_type/is31fl3733-dual.h2
-rw-r--r--keyboards/k_type/k_type.c2
-rw-r--r--keyboards/kbdfans/bella/rgb/rgb.c2
-rw-r--r--keyboards/kbdfans/bella/rgb_iso/rgb_iso.c2
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c2
-rw-r--r--keyboards/kbdfans/kbdmini/kbdmini.c2
-rwxr-xr-xkeyboards/kbdfans/maja/maja.c2
-rw-r--r--keyboards/keychron/q1/q1.c2
-rw-r--r--keyboards/latin17rgb/latin17rgb.c2
-rw-r--r--keyboards/latin60rgb/latin60rgb.c2
-rw-r--r--keyboards/latin6rgb/latin6rgb.c2
-rw-r--r--keyboards/matrix/m20add/rgb_ring.c2
-rw-r--r--keyboards/matrix/noah/noah.c2
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c2
-rw-r--r--keyboards/mechlovin/delphine/rgb_led/rgb_led.c2
-rw-r--r--keyboards/mechlovin/hannah60rgb/rev2/rev2.c2
-rw-r--r--keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c2
-rw-r--r--keyboards/melgeek/mj61/rev1/rev1.c2
-rw-r--r--keyboards/melgeek/mj61/rev2/rev2.c2
-rw-r--r--keyboards/melgeek/mj63/rev1/rev1.c2
-rw-r--r--keyboards/melgeek/mj63/rev2/rev2.c2
-rw-r--r--keyboards/melgeek/mj64/rev1/rev1.c2
-rw-r--r--keyboards/melgeek/mj64/rev2/rev2.c2
-rw-r--r--keyboards/melgeek/mj64/rev3/rev3.c2
-rw-r--r--keyboards/melgeek/mj65/rev3/rev3.c2
-rw-r--r--keyboards/melgeek/mojo75/rev1/rev1.c2
-rw-r--r--keyboards/melgeek/z70ultra/z70ultra.c2
-rw-r--r--keyboards/miller/gm862/gm862.c2
-rw-r--r--keyboards/moonlander/moonlander.c2
-rw-r--r--keyboards/mt64rgb/mt64rgb.c2
-rw-r--r--keyboards/mt84/mt84.c2
-rw-r--r--keyboards/opendeck/32/rev1/rev1.c2
-rw-r--r--keyboards/planck/ez/ez.c2
-rw-r--r--keyboards/planck/light/light.c2
-rw-r--r--keyboards/terrazzo/terrazzo.c2
-rw-r--r--keyboards/tkc/portico/portico.c2
-rw-r--r--keyboards/whitefox/whitefox.c2
-rw-r--r--keyboards/wilba_tech/wt_rgb_backlight.c16
-rw-r--r--keyboards/xbows/knight/knight.c2
-rw-r--r--keyboards/xbows/knight_plus/knight_plus.c2
-rw-r--r--keyboards/xbows/nature/nature.c2
-rw-r--r--keyboards/xbows/numpad/numpad.c2
-rw-r--r--keyboards/xbows/woody/woody.c2
-rw-r--r--keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c2
-rw-r--r--keyboards/xelus/pachi/rgb/rgb.c2
-rw-r--r--tmk_core/common/progmem.h1
76 files changed, 95 insertions, 92 deletions
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md
index afa11e7232..7d7971bbed 100644
--- a/docs/feature_led_matrix.md
+++ b/docs/feature_led_matrix.md
@@ -52,7 +52,7 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 18e38955ec..670d7e09bf 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -52,7 +52,7 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -122,7 +122,7 @@ Currently only 4 drivers are supported, but it would be trivial to support all 8
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -186,7 +186,7 @@ Currently only 2 drivers are supported, but it would be trivial to support all 4
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -287,7 +287,7 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
+const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL] = {
/* Each AW20216 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
diff --git a/docs/ja/feature_led_matrix.md b/docs/ja/feature_led_matrix.md
index f132d716f6..6511b28249 100644
--- a/docs/ja/feature_led_matrix.md
+++ b/docs/ja/feature_led_matrix.md
@@ -52,7 +52,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
`<keyboard>.c` に全ての LED を列挙する配列を定義します:
- const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+ const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* これらの位置については IS31 マニュアルを参照してください
* driver
* | LED address
diff --git a/drivers/led/aw20216.h b/drivers/led/aw20216.h
index c55d9605fc..97ac6dc5bf 100644
--- a/drivers/led/aw20216.h
+++ b/drivers/led/aw20216.h
@@ -18,6 +18,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "progmem.h"
#include "gpio.h"
typedef struct aw_led {
@@ -27,7 +28,7 @@ typedef struct aw_led {
uint8_t b;
} aw_led;
-extern const aw_led g_aw_leds[DRIVER_LED_TOTAL];
+extern const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL];
void AW20216_init(pin_t cs_pin, pin_t en_pin);
void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h
index 9665d6ed35..ecde31eed5 100644
--- a/drivers/led/issi/is31fl3731-simple.h
+++ b/drivers/led/issi/is31fl3731-simple.h
@@ -20,13 +20,14 @@
#include <stdint.h>
#include <stdbool.h>
+#include "progmem.h"
typedef struct is31_led {
uint8_t driver : 2;
uint8_t v;
} __attribute__((packed)) is31_led;
-extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
void IS31FL3731_init(uint8_t addr);
void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h
index 19e8e6251f..803ea3ea12 100644
--- a/drivers/led/issi/is31fl3731.h
+++ b/drivers/led/issi/is31fl3731.h
@@ -19,6 +19,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "progmem.h"
typedef struct is31_led {
uint8_t driver : 2;
@@ -27,7 +28,7 @@ typedef struct is31_led {
uint8_t b;
} __attribute__((packed)) is31_led;
-extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
void IS31FL3731_init(uint8_t addr);
void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h
index 603d505a13..64fd38eb19 100644
--- a/drivers/led/issi/is31fl3733.h
+++ b/drivers/led/issi/is31fl3733.h
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "progmem.h"
typedef struct is31_led {
uint8_t driver : 2;
@@ -28,7 +29,7 @@ typedef struct is31_led {
uint8_t b;
} __attribute__((packed)) is31_led;
-extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
void IS31FL3733_init(uint8_t addr, uint8_t sync);
bool IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h
index e48e31c279..c956c87f7c 100644
--- a/drivers/led/issi/is31fl3736.h
+++ b/drivers/led/issi/is31fl3736.h
@@ -18,6 +18,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "progmem.h"
// Simple interface option.
// If these aren't defined, just define them to make it compile
@@ -37,7 +38,7 @@ typedef struct is31_led {
uint8_t b;
} __attribute__((packed)) is31_led;
-extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
void IS31FL3736_init(uint8_t addr);
void IS31FL3736_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c
index 30906b4840..0bb4ddd425 100644
--- a/drivers/led/issi/is31fl3737.c
+++ b/drivers/led/issi/is31fl3737.c
@@ -19,7 +19,6 @@
#include "is31fl3737.h"
#include "i2c_master.h"
#include "wait.h"
-#include "progmem.h"
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
@@ -155,9 +154,7 @@ void IS31FL3737_init(uint8_t addr) {
void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
if (index >= 0 && index < DRIVER_LED_TOTAL) {
- // copy the led config from progmem to SRAM
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31_led led = g_is31_leds[index];
g_pwm_buffer[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
@@ -173,9 +170,7 @@ void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- // copy the led config from progmem to SRAM
- is31_led led;
- memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
+ is31_led led = g_is31_leds[index];
uint8_t control_register_r = led.r / 8;
uint8_t control_register_g = led.g / 8;
diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h
index a1d2281778..06886e9c9b 100644
--- a/drivers/led/issi/is31fl3737.h
+++ b/drivers/led/issi/is31fl3737.h
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "progmem.h"
typedef struct is31_led {
uint8_t driver : 2;
@@ -28,7 +29,7 @@ typedef struct is31_led {
uint8_t b;
} __attribute__((packed)) is31_led;
-extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
void IS31FL3737_init(uint8_t addr);
void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h
index 2df0c5b1a7..cea6761ca8 100644
--- a/drivers/led/issi/is31fl3741.h
+++ b/drivers/led/issi/is31fl3741.h
@@ -21,6 +21,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "progmem.h"
typedef struct is31_led {
uint32_t driver : 2;
@@ -29,7 +30,7 @@ typedef struct is31_led {
uint32_t b : 10;
} __attribute__((packed)) is31_led;
-extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
void IS31FL3741_init(uint8_t addr);
void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c
index 339bd78d5a..8e3db70d07 100644
--- a/keyboards/clueboard/66_hotswap/gen1/gen1.c
+++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c
@@ -16,7 +16,7 @@
#include "gen1.h"
#ifdef LED_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c
index 475084b049..87543b2a1c 100644
--- a/keyboards/dp60/dp60.c
+++ b/keyboards/dp60/dp60.c
@@ -17,7 +17,7 @@
#include "dp60.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/durgod/dgk6x/galaxy/galaxy.c b/keyboards/durgod/dgk6x/galaxy/galaxy.c
index d101533b16..5f793ed85b 100644
--- a/keyboards/durgod/dgk6x/galaxy/galaxy.c
+++ b/keyboards/durgod/dgk6x/galaxy/galaxy.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/durgod/dgk6x/hades/hades.c b/keyboards/durgod/dgk6x/hades/hades.c
index 21b2722913..3e235683f1 100644
--- a/keyboards/durgod/dgk6x/hades/hades.c
+++ b/keyboards/durgod/dgk6x/hades/hades.c
@@ -19,7 +19,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/durgod/dgk6x/venus/venus.c b/keyboards/durgod/dgk6x/venus/venus.c
index 2d49b34daf..3398acb19d 100644
--- a/keyboards/durgod/dgk6x/venus/venus.c
+++ b/keyboards/durgod/dgk6x/venus/venus.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c
index aa02fb902d..a7fc3dbc5c 100644
--- a/keyboards/dztech/dz60rgb/dz60rgb.c
+++ b/keyboards/dztech/dz60rgb/dz60rgb.c
@@ -1,7 +1,7 @@
#include "dz60rgb.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
{ 0, K_14, J_14, L_14 },
{ 0, K_13, J_13, L_13 },
{ 0, K_12, J_12, L_12 },
diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c
index 4bb5938b66..ab24410912 100644
--- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c
+++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c
@@ -1,7 +1,7 @@
#include "dz60rgb_ansi.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
{ 0, K_14, J_14, L_14 },
{ 0, K_13, J_13, L_13 },
{ 0, K_12, J_12, L_12 },
diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c
index b57560bacd..455624471d 100644
--- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c
+++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c
@@ -1,7 +1,7 @@
#include "dz60rgb_wkl.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
{ 0, H_15, G_15, I_15 },
{ 0, K_14, J_14, L_14 },
{ 0, K_13, J_13, L_13 },
diff --git a/keyboards/dztech/dz65rgb/v1/v1.c b/keyboards/dztech/dz65rgb/v1/v1.c
index 8a3f0e27bf..aabe41c313 100644
--- a/keyboards/dztech/dz65rgb/v1/v1.c
+++ b/keyboards/dztech/dz65rgb/v1/v1.c
@@ -16,7 +16,7 @@
#include "v1.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
{ 0, C8_8, C7_8, C6_8 },
{ 0, C9_8, C7_7, C6_7 },
{ 0, C9_7, C8_7, C6_6 },
diff --git a/keyboards/dztech/dz65rgb/v2/v2.c b/keyboards/dztech/dz65rgb/v2/v2.c
index 788709d989..dce167c73f 100644
--- a/keyboards/dztech/dz65rgb/v2/v2.c
+++ b/keyboards/dztech/dz65rgb/v2/v2.c
@@ -16,7 +16