fix build (#45)

This commit is contained in:
Rob Tillaart
2022-08-04 13:08:29 +02:00
committed by GitHub
parent 803147a945
commit 9001ab38c7
2 changed files with 20 additions and 1 deletions
+15
View File
@@ -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));