From 70f40339c2b4431dbbafa5d9439c04f9a0d47884 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Sun, 13 Dec 2020 18:50:50 +0000 Subject: [PATCH] Add i2c 24LC64 eeprom (#11200) * add 24LC64 eeprom * docs update * Update docs/eeprom_driver.md Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- docs/eeprom_driver.md | 1 + drivers/eeprom/eeprom_i2c.h | 5 +++++ keyboards/xelus/valor_frl_tkl/config.h | 5 +---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/eeprom_driver.md b/docs/eeprom_driver.md index 188b95caa7..e2c262546d 100644 --- a/docs/eeprom_driver.md +++ b/docs/eeprom_driver.md @@ -40,6 +40,7 @@ Module | Equivalent `#define` | Source -----------------|---------------------------------|------------------------------------------ CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | +24LC64 EEPROM | `#define EEPROM_I2C_24LC64` | 24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | 24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | diff --git a/drivers/eeprom/eeprom_i2c.h b/drivers/eeprom/eeprom_i2c.h index 51bce825b0..77eea66d63 100644 --- a/drivers/eeprom/eeprom_i2c.h +++ b/drivers/eeprom/eeprom_i2c.h @@ -49,6 +49,11 @@ # define EXTERNAL_EEPROM_PAGE_SIZE 64 # define EXTERNAL_EEPROM_ADDRESS_SIZE 2 # define EXTERNAL_EEPROM_WRITE_TIME 5 +#elif defined(EEPROM_I2C_24LC64) +# define EXTERNAL_EEPROM_BYTE_COUNT 8192 +# define EXTERNAL_EEPROM_PAGE_SIZE 32 +# define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +# define EXTERNAL_EEPROM_WRITE_TIME 5 #elif defined(EEPROM_I2C_MB85RC256V) # define EXTERNAL_EEPROM_BYTE_COUNT 32768 # define EXTERNAL_EEPROM_PAGE_SIZE 128 diff --git a/keyboards/xelus/valor_frl_tkl/config.h b/keyboards/xelus/valor_frl_tkl/config.h index ad29555eca..ff2ea6dd05 100644 --- a/keyboards/xelus/valor_frl_tkl/config.h +++ b/keyboards/xelus/valor_frl_tkl/config.h @@ -61,10 +61,7 @@ // I2C EEPROM // 24LC64 -#define EXTERNAL_EEPROM_BYTE_COUNT 65535 -#define EXTERNAL_EEPROM_PAGE_SIZE 32 -#define EXTERNAL_EEPROM_ADDRESS_SIZE 2 -#define EXTERNAL_EEPROM_WRITE_TIME 5 +#define EEPROM_I2C_24LC64 // Dynamic EEPROM // Something sensible or else VIA may crash