mirror of
https://github.com/RobTillaart/I2C_EEPROM.git
synced 2026-07-27 20:06:07 +00:00
fix build (#45)
This commit is contained in:
@@ -20,6 +20,21 @@ MicroChip 24LC512, 24LC256, 24LC64, 24LC32, 24LC16, 24LC08, 24LC04, 24LC02, 24LC
|
|||||||
The **I2C_eeprom_cyclic_store** interface is documented [here](README_cyclic_store.md)
|
The **I2C_eeprom_cyclic_store** interface is documented [here](README_cyclic_store.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Schematic
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
+---U---+
|
||||||
|
A0 | 1 8 | VCC = +5V
|
||||||
|
A1 | 2 7 | WP = write protect pin
|
||||||
|
A2 | 3 6 | SCL = I2C clock
|
||||||
|
GND | 4 5 | SDA = I2C data
|
||||||
|
+-------+
|
||||||
|
|
||||||
|
default address = 0x50 .. 0x57 depending on three address lines
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Interface
|
## Interface
|
||||||
|
|
||||||
The interface is kept quite identical to the I2C_24LC1025 library.
|
The interface is kept quite identical to the I2C_24LC1025 library.
|
||||||
|
|||||||
@@ -129,7 +129,11 @@ void dump(uint32_t from, uint32_t to)
|
|||||||
{
|
{
|
||||||
char buffer[24];
|
char buffer[24];
|
||||||
Serial.print('\n');
|
Serial.print('\n');
|
||||||
sprintf(buffer, "%08lX\t", i);
|
#if defined (ESP8266) || defined(ESP32)
|
||||||
|
sprintf(buffer, "%08X\t", i); // ESP cast (long unsigned int)
|
||||||
|
#else
|
||||||
|
sprintf(buffer, "%08lX\t", i); // AVR needs lX
|
||||||
|
#endif;
|
||||||
Serial.print(buffer);
|
Serial.print(buffer);
|
||||||
}
|
}
|
||||||
sprintf(buffer, "%02X\t", ee.readByte(i));
|
sprintf(buffer, "%02X\t", ee.readByte(i));
|
||||||
|
|||||||
Reference in New Issue
Block a user