Skip to content

Commit 551294a

Browse files
committed
Set defaults so users who don't set the memory type will have some functionality.
Fix for issue 25.
1 parent 3abf2c5 commit 551294a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SparkFun_External_EEPROM.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ class ExternalEEPROM
181181
.i2cPort = &Wire,
182182
.deviceAddress =
183183
0b1010000, // 0x50; format is 0b1010 + (A2 A1 A0) or 0b1010 + (B0 A1 A0) for larger (>512kbit) EEPROMs
184-
.memorySize_bytes = (uint32_t)512 * 1024 / 8, // 65,536 bytes = 512-Kbit EEPROM
185-
.pageSize_bytes = 64,
184+
.memorySize_bytes = 4096, // Default to 4096, to support 24xx32 / 4096 byte EEPROMs and larger
185+
.pageSize_bytes = 32, // Default to 32 bytes, to support 24xx32 / 4096 byte EEPROMs and larger
186186
.writeTime_ms = 5, //All EEPROMs seem to have a max write time of 5ms
187187
.pollForWriteComplete = true,
188-
.addressSize_bytes = 0,
188+
.addressSize_bytes = 2, // Default to two address bytes, to support 24xx32 / 4096 byte EEPROMs and larger
189189
};
190190
};
191191

0 commit comments

Comments
 (0)