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.c3
-rw-r--r--drivers/led/aw20216.h2
-rw-r--r--drivers/led/ckled2001.c6
-rw-r--r--drivers/led/ckled2001.h2
-rw-r--r--drivers/led/issi/is31fl3731-simple.c6
-rw-r--r--drivers/led/issi/is31fl3731-simple.h2
-rw-r--r--drivers/led/issi/is31fl3731.c6
-rw-r--r--drivers/led/issi/is31fl3731.h2
-rw-r--r--drivers/led/issi/is31fl3733.c6
-rw-r--r--drivers/led/issi/is31fl3733.h2
-rw-r--r--drivers/led/issi/is31fl3736.c6
-rw-r--r--drivers/led/issi/is31fl3736.h2
-rw-r--r--drivers/led/issi/is31fl3737.c6
-rw-r--r--drivers/led/issi/is31fl3737.h2
-rw-r--r--drivers/led/issi/is31fl3741.c6
-rw-r--r--drivers/led/issi/is31fl3741.h2
-rw-r--r--keyboards/canary/canary60rgb/canary60rgb.c2
-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/evyd13/atom47/rev5/rev5.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/gmmk/pro/ansi/keymaps/mattgauf/ansi.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/boop65/rgb/rgb.c2
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c2
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c2
-rwxr-xr-xkeyboards/kbdfans/kbd67/mkiirgb/v3/v3.c2
-rw-r--r--keyboards/kbdfans/kbdmini/kbdmini.c2
-rwxr-xr-xkeyboards/kbdfans/maja/maja.c2
-rw-r--r--keyboards/keychron/q1/rev_0100/rev_0100.c2
-rw-r--r--keyboards/keychron/q1/rev_0102/rev_0102.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/adelais/rgb_led/rev3/rev3.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
-rwxr-xr-xkeyboards/melgeek/mach80/rev1/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
-rwxr-xr-xkeyboards/melgeek/mojo68/rev1/rev1.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/neson_design/n6/n6.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/playkbtw/pk64rgb/pk64rgb.c2
-rw-r--r--keyboards/smallkeyboard/smallkeyboard.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/ranger/ranger.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/rev1/rev1.c2
-rw-r--r--keyboards/xelus/pachi/rgb/rev2/rev2.c2
-rw-r--r--platforms/progmem.h1
99 files changed, 131 insertions, 117 deletions
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md
index d96199a3c7..dfd63503f2 100644
--- a/docs/feature_led_matrix.md
+++ b/docs/feature_led_matrix.md
@@ -54,7 +54,7 @@ For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM 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 d3d740c1b9..d07c02e184 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -55,7 +55,7 @@ For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -140,7 +140,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 __flash g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -218,7 +218,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 __flash g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -319,7 +319,7 @@ Here is an example using 2 drivers.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
-const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL] = {
+const aw_led PROGMEM 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 6511b28249..2b1979ec68 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 __flash g_is31_leds[DRIVER_LED_TOTAL] = {
+ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
/* これらの位置については IS31 マニュアルを参照してください
* driver
* | LED address
diff --git a/drivers/led/aw20216.c b/drivers/led/aw20216.c
index c608c0ab44..2c7ff8f088 100644
--- a/drivers/led/aw20216.c
+++ b/drivers/led/aw20216.c
@@ -119,7 +119,8 @@ 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) {
- aw_led led = g_aw_leds[index];
+ aw_led led;
+ memcpy_P(&led, (&g_aw_leds[index]), sizeof(led));
g_pwm_buffer[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
diff --git a/drivers/led/aw20216.h b/drivers/led/aw20216.h
index 97ac6dc5bf..0a17050fed 100644
--- a/drivers/led/aw20216.h
+++ b/drivers/led/aw20216.h
@@ -28,7 +28,7 @@ typedef struct aw_led {
uint8_t b;
} aw_led;
-extern const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL];
+extern const aw_led PROGMEM 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/ckled2001.c b/drivers/led/ckled2001.c
index 6307303437..990e50cb60 100644
--- a/drivers/led/ckled2001.c
+++ b/drivers/led/ckled2001.c
@@ -141,8 +141,9 @@ void CKLED2001_init(uint8_t addr) {
}
void CKLED2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ ckled2001_led led;
if (index >= 0 && index < DRIVER_LED_TOTAL) {
- ckled2001_led led = g_ckled2001_leds[index];
+ memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
g_pwm_buffer[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
@@ -158,7 +159,8 @@ void CKLED2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void CKLED2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- ckled2001_led led = g_ckled2001_leds[index];
+ ckled2001_led led;
+ memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
uint8_t control_register_r = led.r / 8;
uint8_t control_register_g = led.g / 8;
diff --git a/drivers/led/ckled2001.h b/drivers/led/ckled2001.h
index efe399690a..1967961d20 100644
--- a/drivers/led/ckled2001.h
+++ b/drivers/led/ckled2001.h
@@ -27,7 +27,7 @@ typedef struct ckled2001_led {
uint8_t b;
} __attribute__((packed)) ckled2001_led;
-extern const ckled2001_led __flash g_ckled2001_leds[DRIVER_LED_TOTAL];
+extern const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL];
void CKLED2001_init(uint8_t addr);
bool CKLED2001_write_register(uint8_t addr, uint8_t reg, uint8_t data);
diff --git a/drivers/led/issi/is31fl3731-simple.c b/drivers/led/issi/is31fl3731-simple.c
index 9d28ea91d0..f51e2e38af 100644
--- a/drivers/led/issi/is31fl3731-simple.c
+++ b/drivers/led/issi/is31fl3731-simple.c
@@ -193,8 +193,9 @@ void IS31FL3731_init(uint8_t addr) {
}
void IS31FL3731_set_value(int index, uint8_t value) {
+ is31_led led;
if (index >= 0 && index < DRIVER_LED_TOTAL) {
- is31_led led = g_is31_leds[index];
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
// Subtract 0x24 to get the second index of g_pwm_buffer
g_pwm_buffer[led.driver][led.v - 0x24] = value;
@@ -209,7 +210,8 @@ void IS31FL3731_set_value_all(uint8_t value) {
}
void IS31FL3731_set_led_control_register(uint8_t index, bool value) {
- is31_led led = g_is31_leds[index];
+ is31_led led;
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
uint8_t control_register = (led.v - 0x24) / 8;
uint8_t bit_value = (led.v - 0x24) % 8;
diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h
index ecde31eed5..ded94b0470 100644
--- a/drivers/led/issi/is31fl3731-simple.h
+++ b/drivers/led/issi/is31fl3731-simple.h
@@ -27,7 +27,7 @@ typedef struct is31_led {
uint8_t v;
} __attribute__((packed)) is31_led;
-extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led PROGMEM 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.c b/drivers/led/issi/is31fl3731.c
index fbf24c30fb..e6190a6b90 100644
--- a/drivers/led/issi/is31fl3731.c
+++ b/drivers/led/issi/is31fl3731.c
@@ -181,8 +181,9 @@ void IS31FL3731_init(uint8_t addr) {
}
void IS31FL3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ is31_led led;
if (index >= 0 && index < DRIVER_LED_TOTAL) {
- is31_led led = g_is31_leds[index];
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
// Subtract 0x24 to get the second index of g_pwm_buffer
g_pwm_buffer[led.driver][led.r - 0x24] = red;
@@ -199,7 +200,8 @@ void IS31FL3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void IS31FL3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led = g_is31_leds[index];
+ is31_led led;
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
uint8_t control_register_r = (led.r - 0x24) / 8;
uint8_t control_register_g = (led.g - 0x24) / 8;
diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h
index 803ea3ea12..6647119eba 100644
--- a/drivers/led/issi/is31fl3731.h
+++ b/drivers/led/issi/is31fl3731.h
@@ -28,7 +28,7 @@ typedef struct is31_led {
uint8_t b;
} __attribute__((packed)) is31_led;
-extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led PROGMEM 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.c b/drivers/led/issi/is31fl3733.c
index 371010fd81..696491d070 100644
--- a/drivers/led/issi/is31fl3733.c
+++ b/drivers/led/issi/is31fl3733.c
@@ -181,8 +181,9 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) {
}
void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ is31_led led;
if (index >= 0 && index < DRIVER_LED_TOTAL) {
- is31_led led = g_is31_leds[index];
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
g_pwm_buffer[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
@@ -198,7 +199,8 @@ void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
}
void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
- is31_led led = g_is31_leds[index];
+ is31_led led;
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
uint8_t control_register_r = led.r / 8;
uint8_t control_register_g = led.g / 8;
diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h
index daa226b41a..c5d62fed85 100644
--- a/drivers/led/issi/is31fl3733.h
+++ b/drivers/led/issi/is31fl3733.h
@@ -30,7 +30,7 @@ typedef struct is31_led {
uint8_t b;
} __attribute__((packed)) is31_led;
-extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL];
+extern const is31_led PROGMEM 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.c b/drivers/led/issi/is31fl3736.c
index dcaabba2ef..c9a871118d 100644
--- a/drivers/led/issi/is31fl3736.c
+++ b/drivers/led/issi/is31fl3736.c
@@ -163,8 +163,9 @@ void IS31FL3736_init(uint8_t addr) {
}
void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ is31_led led;
if (index >= 0 && index < DRIVER_LED_TOTAL) {
- is31_led led = g_is31_leds[index];
+ memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
g_pwm_buffer[led.driver][led.r] = red;
g_pwm_buffer[led.driver][led.g] = green;
@@ -180,7 +181,8 @@ void IS31FL3736_set_color_all(uint8_t red, uint8_t green, u