Skip to content
Snippets Groups Projects
Commit a6e7b774 authored by Mario Six's avatar Mario Six Committed by Heiko Schocher
Browse files

i2c/eeprom: Always define I2C_RXTX_LEN


I2C_RXTX_LEN from include/i2c.h is not defined if CONFIG_DM_I2C is
enabled. This leads to a compilation error on boards that enable both
CONFIG_CMD_EEPROM and CONFIG_DM_I2C.

To avoid this, we define I2C_RXTX_LEN in cmd/eeprom.c if it is not
already defined.

Signed-off-by: default avatarMario Six <mario.six@gdsys.cc>
parent 58abb988
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 8 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 8
#endif #endif
#ifndef I2C_RXTX_LEN
#define I2C_RXTX_LEN 128
#endif
#define EEPROM_PAGE_SIZE (1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS) #define EEPROM_PAGE_SIZE (1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS)
#define EEPROM_PAGE_OFFSET(x) ((x) & (EEPROM_PAGE_SIZE - 1)) #define EEPROM_PAGE_OFFSET(x) ((x) & (EEPROM_PAGE_SIZE - 1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment