Skip to content

Commit d414045

Browse files
zvecrLorenzo Castoldi
authored and
Lorenzo Castoldi
committed
Migrate WEAR_LEVELING_*_SIZE to info.json (qmk#22010)
1 parent 1c76cb1 commit d414045

File tree

58 files changed

+89
-120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+89
-120
lines changed

keyboards/akko/5108/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#define SPI_MOSI_PAL_MODE 5
3636

3737
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
38-
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
3938

4039
/* I2C Config for LED Driver */
4140
#define IS31FL3733_DRIVER_COUNT 2

keyboards/akko/5108/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"eeprom": {
3030
"driver": "wear_leveling",
3131
"wear_leveling": {
32-
"driver": "spi_flash"
32+
"driver": "spi_flash",
33+
"backing_size": 8192
3334
}
3435
},
3536
"indicators": {

keyboards/akko/acr87/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#define SPI_MOSI_PAL_MODE 5
3333

3434
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
35-
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
3635

3736
/* I2C Config for LED Driver */
3837
#define IS31FL3733_DRIVER_COUNT 3

keyboards/akko/acr87/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"eeprom": {
3030
"driver": "wear_leveling",
3131
"wear_leveling": {
32-
"driver": "spi_flash"
32+
"driver": "spi_flash",
33+
"backing_size": 8192
3334
}
3435
},
3536
"rgb_matrix": {

keyboards/akko/top40/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#define SPI_MOSI_PAL_MODE 5
3333

3434
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
35-
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
3635

3736
/* I2C Config for LED Driver */
3837
#define IS31FL3733_DRIVER_COUNT 2

keyboards/akko/top40/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"eeprom": {
3030
"driver": "wear_leveling",
3131
"wear_leveling": {
32-
"driver": "spi_flash"
32+
"driver": "spi_flash",
33+
"backing_size": 8192
3334
}
3435
},
3536
"rgb_matrix": {

keyboards/annepro2/c15/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,3 @@
5757
#define EXTERNAL_FLASH_SECTOR_SIZE 4096
5858
#define EXTERNAL_FLASH_BLOCK_SIZE 4096
5959
#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size
60-
61-
// Wear-leveling driver configuration
62-
#define WEAR_LEVELING_LOGICAL_SIZE 1024
63-
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)

keyboards/annepro2/c15/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"eeprom": {
77
"driver": "wear_leveling",
88
"wear_leveling": {
9-
"driver": "spi_flash"
9+
"driver": "spi_flash",
10+
"backing_size": 2048
1011
}
1112
},
1213
"rgb_matrix": {

keyboards/annepro2/c18/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,3 @@
5555
#define EXTERNAL_FLASH_SECTOR_SIZE 4096
5656
#define EXTERNAL_FLASH_BLOCK_SIZE 4096
5757
#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size
58-
59-
// Wear-leveling driver configuration
60-
#define WEAR_LEVELING_LOGICAL_SIZE 1024
61-
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)

keyboards/annepro2/c18/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"eeprom": {
77
"driver": "wear_leveling",
88
"wear_leveling": {
9-
"driver": "spi_flash"
9+
"driver": "spi_flash",
10+
"backing_size": 2048
1011
}
1112
},
1213
"rgb_matrix": {

keyboards/binepad/bn006/config.h

-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33

44
#pragma once
55

6-
/*
7-
* Wear Leveling EEPROM Emulation
8-
*/
9-
10-
#define WEAR_LEVELING_LOGICAL_SIZE 2048 // Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
11-
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
12-
13-
146
/*
157
* RGB Matrix
168
*/

keyboards/binepad/bn006/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
"pid": "0x426E",
2525
"device_version": "1.0.0"
2626
},
27+
"eeprom": {
28+
"wear_leveling": {
29+
"backing_size": 4096
30+
}
31+
},
2732
"ws2812": {
2833
"pin": "B15"
2934
},

keyboards/binepad/bn006/rules.mk

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
# Copyright 2022 Binepad (@binpad)
2-
# SPDX-License-Identifier: GPL-2.0-or-later
3-
4-
EPROM_DRIVER = wear_leveling
5-
WEAR_LEVELING_DRIVER = embedded_flash
1+
# This file intentionally left blank

keyboards/binepad/bn009/r2/config.h

-12
This file was deleted.

keyboards/binepad/bn009/r2/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
"cols": ["A1", "A2", "A6"],
77
"rows": ["B6", "B7", "B2"]
88
},
9+
"eeprom": {
10+
"wear_leveling": {
11+
"backing_size": 4096
12+
}
13+
},
914
"processor": "STM32F103",
1015
"usb": {
1116
"device_version": "2.0.0"

keyboards/binepad/bnr1/v2/config.h

-7
This file was deleted.

keyboards/chosfox/cf81/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#define SPI_MOSI_PAL_MODE 5
3333

3434
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
35-
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
3635

3736
/* I2C Config for LED Driver */
3837
#define IS31FL3733_DRIVER_COUNT 2

keyboards/chosfox/cf81/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"eeprom": {
1313
"driver": "wear_leveling",
1414
"wear_leveling": {
15-
"driver": "spi_flash"
15+
"driver": "spi_flash",
16+
"backing_size": 8192
1617
}
1718
},
1819
"processor": "WB32FQ95",

keyboards/gmmk/gmmk2/p96/ansi/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"eeprom": {
2323
"driver": "wear_leveling",
2424
"wear_leveling": {
25-
"driver": "spi_flash"
25+
"driver": "spi_flash",
26+
"backing_size": 2048
2627
}
2728
},
2829
"processor": "WB32F3G71",

keyboards/gmmk/gmmk2/p96/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
/* External spi flash */
2727
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B14
28-
#define WEAR_LEVELING_BACKING_SIZE 2048
2928

3029
/* SPI Config for LED Driver */
3130
#define SPI_DRIVER SPIDQ

keyboards/gmmk/gmmk2/p96/iso/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"eeprom": {
2323
"driver": "wear_leveling",
2424
"wear_leveling": {
25-
"driver": "spi_flash"
25+
"driver": "spi_flash",
26+
"backing_size": 2048
2627
}
2728
},
2829
"processor": "WB32F3G71",

keyboards/gmmk/numpad/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#define RGB_MATRIX_LED_COUNT 31
3838

3939
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B6
40-
#define WEAR_LEVELING_BACKING_SIZE 2048
4140

4241
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
4342
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN

keyboards/gmmk/numpad/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"eeprom": {
1212
"driver": "wear_leveling",
1313
"wear_leveling": {
14-
"driver": "spi_flash"
14+
"driver": "spi_flash",
15+
"backing_size": 2048
1516
}
1617
},
1718
"encoder": {

keyboards/gmmk/pro/rev2/ansi/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"eeprom": {
2020
"driver": "wear_leveling",
2121
"wear_leveling": {
22-
"driver": "spi_flash"
22+
"driver": "spi_flash",
23+
"backing_size": 2048
2324
}
2425
},
2526
"encoder": {

keyboards/gmmk/pro/rev2/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
/* External spi flash */
2121
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B12
22-
#define WEAR_LEVELING_BACKING_SIZE 2048
2322

2423
/* SPI Config for LED Driver */
2524
#define SPI_DRIVER SPIDQ

keyboards/gmmk/pro/rev2/iso/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"eeprom": {
2020
"driver": "wear_leveling",
2121
"wear_leveling": {
22-
"driver": "spi_flash"
22+
"driver": "spi_flash",
23+
"backing_size": 2048
2324
}
2425
},
2526
"encoder": {

keyboards/hfdkb/ac001/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#define SPI_MOSI_PAL_MODE 5
3333

3434
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
35-
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
3635

3736
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
3837

keyboards/hfdkb/ac001/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"eeprom": {
2121
"driver": "wear_leveling",
2222
"wear_leveling": {
23-
"driver": "spi_flash"
23+
"driver": "spi_flash",
24+
"backing_size": 8192
2425
}
2526
},
2627
"ws2812": {

keyboards/horrortroll/handwired_k552/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
#define EXTERNAL_FLASH_BLOCK_SIZE 4096
3131
#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size
3232

33-
// Wear-leveling driver configuration
34-
#define WEAR_LEVELING_LOGICAL_SIZE 1024
35-
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
36-
3733
#ifdef OLED_ENABLE
3834
/* Mapping I2C2 for OLED */
3935
#define I2C1_SCL_PIN B10

keyboards/horrortroll/handwired_k552/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"eeprom": {
2424
"driver": "wear_leveling",
2525
"wear_leveling": {
26-
"driver": "spi_flash"
26+
"driver": "spi_flash",
27+
"backing_size": 2048
2728
}
2829
},
2930
"community_layouts": ["tkl_ansi"],

keyboards/ibm/model_m/yugo_m/config.h

-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3636
//#define NO_ACTION_LAYER
3737
//#define NO_ACTION_TAPPING
3838
//#define NO_ACTION_ONESHOT
39-
40-
/* redefine available (emulated) EEPROM as 4 kB rather than the default 2 kB to let VIA use more of the on-chip Flash of the STM32F303 to store 4 layers (since 4 layers * 8 rows * 16 columns * 2 = 1024 bytes but the default max available is 1023 bytes due to ATMEGA32U4 etc. only having 1 kB of EEPROM) */
41-
#define WEAR_LEVELING_BACKING_SIZE 4096
42-
#define WEAR_LEVELING_LOGICAL_SIZE 2048

keyboards/ibm/model_m/yugo_m/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"rows": ["B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"]
1414
},
1515
"diode_direction": "ROW2COL",
16+
"eeprom": {
17+
"wear_leveling": {
18+
"backing_size": 4096
19+
}
20+
},
1621
"processor": "STM32F303",
1722
"bootloader": "stm32-dfu",
1823
"board": "QMK_PROTON_C",

keyboards/inland/kb83/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#define SPI_MOSI_PAL_MODE 5
3737

3838
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
39-
#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
4039

4140
/* I2C Config for LED Driver */
4241
#define IS31FL3733_DRIVER_COUNT 2

keyboards/inland/kb83/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"eeprom": {
2222
"driver": "wear_leveling",
2323
"wear_leveling": {
24-
"driver": "spi_flash"
24+
"driver": "spi_flash",
25+
"backing_size": 8192
2526
}
2627
},
2728
"encoder": {

keyboards/inland/mk47/config.h

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#define SPI_MISO_PIN B4
2424

2525
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
26-
#define WEAR_LEVELING_BACKING_SIZE (4 * 1024)
2726

2827
/* I2C Config for LED Driver */
2928
#define IS31FL3733_DRIVER_COUNT 1

keyboards/inland/mk47/info.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"eeprom": {
3030
"driver": "wear_leveling",
3131
"wear_leveling": {
32-
"driver": "spi_flash"
32+
"driver": "spi_flash",
33+
"backing_size": 4096
3334
}
3435
},
3536
"rgb_matrix": {

keyboards/mechlovin/hex6c/config.h

-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
#pragma once
1919

2020
#define BACKLIGHT_PWM_DRIVER PWMD3
21-
22-
#define WEAR_LEVELING_BACKING_SIZE 4096
23-
#define WEAR_LEVELING_LOGICAL_SIZE 2048

keyboards/mechlovin/hex6c/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"rows": ["A10", "B13", "B12", "B11", "C14", "C15"]
1414
},
1515
"diode_direction": "COL2ROW",
16+
"eeprom": {
17+
"wear_leveling": {
18+
"backing_size": 4096
19+
}
20+
},
1621
"encoder": {
1722
"rotary": [
1823
{"pin_a": "A15", "pin_b": "A2"}

keyboards/mode/m75h/config.h

-21
This file was deleted.

keyboards/mode/m75h/info.json

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"rows": ["C5", "B0", "B14", "B15", "A8", "C9", "A15"]
1414
},
1515
"diode_direction": "COL2ROW",
16+
"eeprom": {
17+
"wear_leveling": {
18+
"backing_size": 4096
19+
}
20+
},
1621
"processor": "STM32F401",
1722
"bootloader": "stm32-dfu",
1823
"layout_aliases": {

0 commit comments

Comments
 (0)