simplify begin() (#60)

- simplify **begin()**, remove setting Wire pins from library.
- add **getAddress()**
- update readme.md
- update examples
This commit is contained in:
Rob Tillaart
2023-11-25 13:19:42 +01:00
committed by GitHub
parent 54cf6bee85
commit ff21bd6cdc
20 changed files with 147 additions and 111 deletions
+7 -1
View File
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [1.8.0] - 2023-11-24 (breaking change)
- simplify **begin()**, remove setting Wire pins from library.
- add **getAddress()**
- update readme.md
- update examples
## [1.7.4] - 2023-09-06
- solve #57 add support for WriteProtectPin
- add writeProtectPin as optional parameter in **begin()**
@@ -18,7 +25,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- update keywords.txt
- update readme.md
## [1.7.3] - 2023-05-10
- fix #55 ==> redo fix #53
- add test to detect **MBED** and **RP2040**
+7 -48
View File
@@ -1,7 +1,7 @@
//
// FILE: I2C_eeprom.cpp
// AUTHOR: Rob Tillaart
// VERSION: 1.7.4
// VERSION: 1.8.0
// PURPOSE: Arduino Library for external I2C EEPROM 24LC256 et al.
// URL: https://github.com/RobTillaart/I2C_EEPROM.git
@@ -53,56 +53,9 @@ I2C_eeprom::I2C_eeprom(const uint8_t deviceAddress, const uint32_t deviceSize, T
}
#if defined(ESP8266) || defined(ESP32)
bool I2C_eeprom::begin(uint8_t sda, uint8_t scl, int8_t writeProtectPin)
{
// if (_wire == 0) Serial.println("zero"); // test #48
if ((sda < 255) && (scl < 255))
{
_wire->begin(sda, scl);
}
else
{
_wire->begin();
}
_lastWrite = 0;
_writeProtectPin = writeProtectPin;
if (_writeProtectPin >= 0)
{
pinMode(_writeProtectPin, OUTPUT);
preventWrite();
}
return isConnected();
}
#elif defined(ARDUINO_ARCH_RP2040) && !defined(__MBED__)
bool I2C_eeprom::begin(uint8_t sda, uint8_t scl, int8_t writeProtectPin)
{
if ((sda < 255) && (scl < 255))
{
_wire->setSCL(scl);
_wire->setSDA(sda);
_wire->begin();
}
_lastWrite = 0;
_writeProtectPin = writeProtectPin;
if (_writeProtectPin >= 0)
{
pinMode(_writeProtectPin, OUTPUT);
preventWrite();
}
return isConnected();
}
#endif
bool I2C_eeprom::begin(int8_t writeProtectPin)
{
// if (_wire == 0) Serial.println("zero"); // test #48
_wire->begin();
_lastWrite = 0;
_writeProtectPin = writeProtectPin;
if (_writeProtectPin >= 0)
@@ -121,6 +74,12 @@ bool I2C_eeprom::isConnected()
}
uint8_t I2C_eeprom::getAddress()
{
return _deviceAddress;
}
/////////////////////////////////////////////////////////////
//
// WRITE SECTION
+3 -8
View File
@@ -2,7 +2,7 @@
//
// FILE: I2C_eeprom.h
// AUTHOR: Rob Tillaart
// VERSION: 1.7.4
// VERSION: 1.8.0
// PURPOSE: Arduino Library for external I2C EEPROM 24LC256 et al.
// URL: https://github.com/RobTillaart/I2C_EEPROM.git
@@ -11,7 +11,7 @@
#include "Wire.h"
#define I2C_EEPROM_VERSION (F("1.7.4"))
#define I2C_EEPROM_VERSION (F("1.8.0"))
#define I2C_DEVICESIZE_24LC512 65536
@@ -59,15 +59,10 @@ public:
*/
I2C_eeprom(const uint8_t deviceAddress, const uint32_t deviceSize, TwoWire *wire = &Wire);
// MBED test ==> see #55, #53
#if defined(ESP8266) || defined(ESP32) || (defined(ARDUINO_ARCH_RP2040) && !defined(__MBED__))
// set the I2C pins explicitly (overrule)
bool begin(uint8_t sda, uint8_t scl, int8_t writeProtectPin = -1);
#endif
// use default I2C pins.
bool begin(int8_t writeProtectPin = -1);
bool isConnected();
uint8_t getAddress();
// writes a byte to memoryAddress
+11 -10
View File
@@ -34,6 +34,15 @@ to solve the issue #53 while being backwards compatible.
If a better solution is found, it will be implemented.
#### Breaking change
Version 1.8.0 introduced a breaking change.
You cannot set the pins in **begin()** any more.
This reduces the dependency of processor dependent Wire implementations.
The user has to call **Wire.begin()** and can optionally set the Wire pins
before calling **I2C_eeprom.begin()**.
#### Links
- https://github.com/RobTillaart/I2C_24LC1025
@@ -76,13 +85,8 @@ Furthermore it checks if the deviceAddress is available on the I2C bus.
Returns true if deviceAddress is found on the bus, false otherwise.
Optionally one can set the **WP** writeProtect pin. (see section below).
If the **WP** pin is defined the default will be to **not** allow writing.
- **bool begin(uint8_t sda, uint8_t scl, uint8_t writeProtectPin = -1)** for ESP32 / ESP8266 / RP2040 and alike.
Initializes the I2C bus with the specified pins, thereby overruling the default pins.
Furthermore it checks if the deviceAddress is available on the I2C bus.
Returns true if deviceAddress is found on the bus, false otherwise.
Optionally one can set the **WP** writeProtect pin. (see section below).
If the **WP** pin is defined the default will be to **not** allow writing.
- **bool isConnected()** test to see if deviceAddress is found on the bus.
- **uint8_t getAddress()** returns device address set in the constructor.
### Write functions
@@ -195,7 +199,7 @@ than 5 milliseconds which is the minimum.
- **void setExtraWriteCycleTime(uint8_t ms)** idem
- **uint8_t getExtraWriteCycleTime()** idem
Since 1.7.2 it is also possible to adjust the **I2C_WRITEDELAY** in the .h file
It is also possible to adjust the **I2C_WRITEDELAY** in the .h file
or overrule the define on the command line.
@@ -252,21 +256,18 @@ See examples
- write functions should return bytes written or so.
- make deviceSize explicit in examples?
#### Could
- investigate smarter strategy for **updateBlock()**
=> find first and last changed position could possibly result in less writes.
- can **setBlock()** use strategies from **updateBlock()**
#### Wont
- investigate the print interface?
- circular buffer? (see FRAM library)
- dump function?
## Support
If you appreciate my libraries, you can support the development and maintenance.
+20 -6
View File
@@ -2,24 +2,37 @@
[![Arduino CI](https://github.com/RobTillaart/I2C_EEPROM/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
[![Arduino-lint](https://github.com/RobTillaart/I2C_EEPROM/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/I2C_EEPROM/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/I2C_EEPROM/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/I2C_EEPROM/actions/workflows/jsoncheck.yml)
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/I2C_EEPROM.svg)](https://github.com/RobTillaart/I2C_EEPROM/issues)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/I2C_EEPROM/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RobTillaart/I2C_EEPROM.svg?maxAge=3600)](https://github.com/RobTillaart/I2C_EEPROM/releases)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/I2C_EEPROM.svg)](https://registry.platformio.org/libraries/robtillaart/I2C_EEPROM)
# I2C_eeprom_cyclic_store
Utility class for storing data using cyclic writes to eeprom memory
Utility class for storing data using cyclic writes to eeprom memory.
## Description
In order to maximize the life expectancy of an eeprom this class implements a method to spread the write operations across as much of the eeprom as possible, rather than writing to the same fixed location.
In order to maximize the life expectancy of an eeprom this class implements
a method to spread the write operations across as much of the eeprom as possible,
rather than writing to the same fixed location.
This is suitable for a situation where a single data structure (buffer), such as settings, configuration or metric data, is written to the eeprom.
This is suitable for a situation where a single data structure (buffer),
such as settings, configuration or metric data, is written to the eeprom.
It operates by partitioning the eeprom into slots large enough to hold the declared buffer (and header) and then writing each new version of the data to the next slot, overwriting any older version already in there. As it reaches the end of the alotted region of the eeprom it wraps around and starts writing from the start of the memory again. When initializing an instance it scans the eeprom to find the last written version and continues from that.
It operates by partitioning the eeprom into slots large enough to hold the
declared buffer (and header) and then writing each new version of the data
to the next slot, overwriting any older version already in there.
As it reaches the end of the alotted region of the eeprom it wraps around
and starts writing from the start of the memory again.
When initializing an instance it scans the eeprom to find the last written
version and continues from that.
In order to use an eeprom that already has data (and if the structure of the buffer changes) the eeprom has to be prepared by formatting the indexes.
In order to use an eeprom that already has data (and if the structure of the
buffer changes) the eeprom has to be prepared by formatting the indexes.
The interface is pretty straightforward
@@ -32,7 +45,8 @@ The interface is pretty straightforward
## Limitation
The class does not handle changes in buffer size or structure, nor does it detect an eeprom that has data that wasn't written using the class.
The class does not handle changes in buffer size or structure, nor does
it detect an eeprom that has data that wasn't written using the class.
## Operational
@@ -32,6 +32,8 @@ void setup()
Serial.begin(115200);
while(!Serial);
Wire.begin();
ee.begin();
cs.begin(ee, PAGE_SIZE, MEMORY_SIZE/PAGE_SIZE);
@@ -16,10 +16,13 @@ uint32_t start, diff;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Wire.begin();
ee.begin();
if (! ee.isConnected())
{
@@ -16,10 +16,13 @@ uint32_t start, diff;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Wire.begin();
ee.begin();
if (! ee.isConnected())
{
@@ -27,12 +27,12 @@ struct
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial to connect.
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Serial.println();
Wire.begin();
ee.begin();
if (! ee.isConnected())
+5 -1
View File
@@ -26,8 +26,12 @@ uint32_t start, diff, totals = 0;
void setup()
{
SERIAL_OUT.begin(115200);
while (!SERIAL_OUT); // wait for SERIAL_OUT port to connect. Needed for Leonardo only
while (!SERIAL_OUT); // wait for SERIAL_OUT port to connect. Needed for Leonardo only
SERIAL_OUT.println(__FILE__);
SERIAL_OUT.print("I2C_EEPROM_VERSION: ");
SERIAL_OUT.println(I2C_EEPROM_VERSION);
Wire.begin();
ee.begin();
if (! ee.isConnected())
@@ -16,11 +16,13 @@ uint32_t start, diff, totals = 0;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Wire.begin();
ee.begin();
if (! ee.isConnected())
{
@@ -18,12 +18,13 @@ uint32_t start, dur1, dur2;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for SERIAL_OUT port to connect. Needed for Leonardo only
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Wire.begin();
ee.begin();
if (! ee.isConnected())
{
@@ -21,12 +21,12 @@ uint8_t ar[100];
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for SERIAL_OUT port to connect. Needed for Leonardo only
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Serial.println();
Wire.begin();
ee.begin();
if (! ee.isConnected())
@@ -19,12 +19,13 @@ uint32_t start, dur1, dur2;
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for SERIAL_OUT port to connect. Needed for Leonardo only
while (!Serial); // wait for Serial port to connect. Needed for Leonardo only
Serial.println(__FILE__);
Serial.print("VERSION: ");
Serial.print("I2C_EEPROM_VERSION: ");
Serial.println(I2C_EEPROM_VERSION);
Wire.begin();
ee.begin();
if (! ee.isConnected())
{
@@ -105,6 +105,8 @@ void setup()
SERIAL_DEBUG.println("IT IS BEGINNING");
SERIAL_DEBUG.println("WAIT FOR IT");
Wire.begin();
eeprom.begin();
readAndWriteVar();
+1 -1
View File
@@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/I2C_EEPROM.git"
},
"version": "1.7.4",
"version": "1.8.0",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
+1 -1
View File
@@ -1,5 +1,5 @@
name=I2C_EEPROM
version=1.7.4
version=1.8.0
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library for I2C EEPROMS
+14 -4
View File
@@ -63,7 +63,7 @@ unittest(test_new_operator)
unittest(test_constructor)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom EE(0x50, 0x8000);
assertTrue(EE.begin());
@@ -76,6 +76,8 @@ unittest(test_constructor)
unittest(test_constants)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom EE(0x50, 0x8000);
assertEqual(I2C_DEVICESIZE_24LC512, 65536);
@@ -93,6 +95,8 @@ unittest(test_constants)
unittest(test_getPageSize)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom EE(0x50, 0x8000);
assertEqual(EE.getPageSize(I2C_DEVICESIZE_24LC512), 128);
@@ -114,6 +118,8 @@ unittest(test_getPageSize)
unittest(test_setDeviceSize)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom EE(0x50, 0x8000);
assertEqual(EE.setDeviceSize(I2C_DEVICESIZE_24LC512), I2C_DEVICESIZE_24LC512);
@@ -140,9 +146,11 @@ unittest(test_setDeviceSize)
}
/*
unittest(test_setPageSize)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom EE(0x50, 0x8000);
assertEqual(EE.setPageSize(129), 128);
@@ -159,8 +167,10 @@ unittest(test_setPageSize)
assertEqual(EE.setPageSize(9), 8);
assertEqual(EE.setPageSize(8), 8);
}
*/
unittest_main()
// --------
// -- END OF FILE --
+22 -1
View File
@@ -46,6 +46,7 @@ unittest_teardown()
unittest(cyclic_store_fails_begin)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -63,6 +64,7 @@ unittest(cyclic_store_fails_begin)
unittest(cyclic_store_empty_begin)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -87,6 +89,7 @@ unittest(cyclic_store_empty_begin)
unittest(cyclic_store_double_page_buffer)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -117,6 +120,7 @@ unittest(cyclic_store_double_page_buffer)
unittest(cyclic_store_finds_single_stored_version)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -155,6 +159,7 @@ unittest(cyclic_store_finds_single_stored_version)
unittest(cyclic_store_finds_last_half_filled_eeprom)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -205,6 +210,7 @@ unittest(cyclic_store_finds_last_half_filled_eeprom)
unittest(cyclic_store_finds_version_if_last_slot)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -256,6 +262,7 @@ unittest(cyclic_store_finds_version_if_last_slot)
unittest(cyclic_store_finds_last_wrapped_eeprom)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -310,6 +317,7 @@ unittest(cyclic_store_finds_last_wrapped_eeprom)
unittest(cyclic_store_finds_last_wrapped_eeprom_double_page_buffer)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -361,6 +369,7 @@ unittest(cyclic_store_finds_last_wrapped_eeprom_double_page_buffer)
unittest(cyclic_store_fails_init_on_too_large_buffer)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom EE(I2C_EEPROM_ADDR, I2C_EEPROM_SIZE);
EE.begin();
@@ -376,6 +385,7 @@ unittest(cyclic_store_fails_init_on_too_large_buffer)
unittest(cyclic_store_empty_metrics)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -407,6 +417,7 @@ unittest(cyclic_store_empty_metrics)
unittest(cyclic_store_fails_metrics_when_failed_initialize)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom EE(I2C_EEPROM_ADDR, I2C_EEPROM_SIZE);
EE.begin();
@@ -427,6 +438,7 @@ unittest(cyclic_store_fails_metrics_when_failed_initialize)
unittest(cyclic_store_fails_metrics_when_not_initialized)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom EE(I2C_EEPROM_ADDR, I2C_EEPROM_SIZE);
EE.begin();
@@ -447,6 +459,7 @@ unittest(cyclic_store_fails_metrics_when_not_initialized)
unittest(cyclic_store_increments_write_counter)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -489,6 +502,7 @@ unittest(cyclic_store_increments_write_counter)
unittest(cyclic_store_format_single_page)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -522,6 +536,7 @@ unittest(cyclic_store_format_single_page)
unittest(cyclic_store_format_double_page)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -556,6 +571,7 @@ unittest(cyclic_store_format_double_page)
unittest(cyclic_store_format_double_page_odd_space)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -590,6 +606,7 @@ unittest(cyclic_store_format_double_page_odd_space)
unittest(cyclic_store_wrapping_single_page)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -635,6 +652,7 @@ unittest(cyclic_store_wrapping_single_page)
unittest(cyclic_store_wrapping_double_page)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -677,6 +695,7 @@ unittest(cyclic_store_wrapping_double_page)
unittest(cyclic_store_wrapping_double_page_odd_space)
{
Wire.resetMocks();
Wire.begin();
auto mosi = Wire.getMosi(I2C_EEPROM_ADDR);
@@ -713,4 +732,6 @@ unittest(cyclic_store_wrapping_double_page_odd_space)
unittest_main()
// --------
// -- END OF FILE --
+13 -1
View File
@@ -45,6 +45,7 @@ unittest_teardown()
unittest(i2c_eeprom_default_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR);
@@ -61,6 +62,7 @@ unittest(i2c_eeprom_default_page_size)
unittest(i2c_eeprom_1k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x80);
@@ -76,6 +78,7 @@ unittest(i2c_eeprom_1k_page_size)
unittest(i2c_eeprom_2k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x100);
@@ -91,6 +94,7 @@ unittest(i2c_eeprom_2k_page_size)
unittest(i2c_eeprom_4k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x200);
@@ -106,6 +110,7 @@ unittest(i2c_eeprom_4k_page_size)
unittest(i2c_eeprom_8k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x400);
@@ -121,6 +126,7 @@ unittest(i2c_eeprom_8k_page_size)
unittest(i2c_eeprom_16k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x800);
@@ -136,6 +142,7 @@ unittest(i2c_eeprom_16k_page_size)
unittest(i2c_eeprom_32k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x1000);
@@ -151,6 +158,7 @@ unittest(i2c_eeprom_32k_page_size)
unittest(i2c_eeprom_64k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x2000);
@@ -166,6 +174,7 @@ unittest(i2c_eeprom_64k_page_size)
unittest(i2c_eeprom_128k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x4000);
@@ -181,6 +190,7 @@ unittest(i2c_eeprom_128k_page_size)
unittest(i2c_eeprom_256k_page_size)
{
Wire.resetMocks();
Wire.begin();
I2C_eeprom eeprom(I2C_EEPROM_ADDR, 0x8000);
@@ -191,4 +201,6 @@ unittest(i2c_eeprom_256k_page_size)
unittest_main()
// ------------------
// -- END OF FILE --