Skip to content

Commit 71b6f78

Browse files
committed
Reorder Ex5 to show how setMemorySizeBytes sets other values as well.
1 parent c6ea74e commit 71b6f78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/Example5_CustomSettings/Example5_CustomSettings.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ void setup()
3838

3939
//Explicitly set the address bytes, page size, and memory size for this EEPROM
4040
// 24xx512 - 524288 bit / 65536 bytes - 2 address bytes, 128 byte page
41-
myMem.setAddressBytes(2);
41+
myMem.setMemorySizeBytes(65536); //This function will set the AddressBytes and PageSize.
42+
myMem.setAddressBytes(2); //Call these functions after MemorySizeBytes. Only needed if you have a very unique EEPROM with odd Address Bytes and Page Sizes.
4243
myMem.setPageSizeBytes(128);
43-
myMem.setMemorySizeBytes(65536);
4444

4545
if (myMem.begin() == false)
4646
{

0 commit comments

Comments
 (0)