1.8.5 I2C_EEPROM

This commit is contained in:
Rob Tillaart 2024-04-22 18:39:54 +02:00
parent 077c478e19
commit 32d8399ace
5 changed files with 13 additions and 10 deletions

View File

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [1.8.5] - 2024-04-22
- Fix #72, force requestFrom parameters to use int type
## [1.8.4] - 2024-04-20
- Fix #70, increase length internal buffer.
- add compile time flag **EN_AUTO_WRITE_PROTECT** (thanks to microfoundry)
@ -13,7 +17,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- add URL to examples
- minor edits.
## [1.8.3] - 2024-03-28
- Fix #64, compiler warning.
- add **verifyBlock(memoryAddress, buffer, length)**

View File

@ -1,7 +1,7 @@
//
// FILE: I2C_eeprom.cpp
// AUTHOR: Rob Tillaart
// VERSION: 1.8.4
// VERSION: 1.8.5
// PURPOSE: Arduino Library for external I2C EEPROM 24LC256 et al.
// URL: https://github.com/RobTillaart/I2C_EEPROM
@ -651,12 +651,12 @@ uint8_t I2C_eeprom::_ReadBlock(const uint16_t memoryAddress, uint8_t * buffer, c
uint8_t readBytes = 0;
if (this->_isAddressSizeTwoWords)
{
readBytes = _wire->requestFrom(_deviceAddress, length);
readBytes = _wire->requestFrom((int)_deviceAddress, (int)length);
}
else
{
uint8_t address = _deviceAddress | ((memoryAddress >> 8) & 0x07);
readBytes = _wire->requestFrom(address, length);
readBytes = _wire->requestFrom((int)address, (int)length);
}
yield(); // For OS scheduling
uint8_t count = 0;
@ -692,12 +692,12 @@ bool I2C_eeprom::_verifyBlock(const uint16_t memoryAddress, const uint8_t * buff
uint8_t readBytes = 0;
if (this->_isAddressSizeTwoWords)
{
readBytes = _wire->requestFrom(_deviceAddress, length);
readBytes = _wire->requestFrom((int)_deviceAddress, (int)length);
}
else
{
uint8_t address = _deviceAddress | ((memoryAddress >> 8) & 0x07);
readBytes = _wire->requestFrom(address, length);
readBytes = _wire->requestFrom((int)address, (int)length);
}
yield(); // For OS scheduling
uint8_t count = 0;

View File

@ -2,7 +2,7 @@
//
// FILE: I2C_eeprom.h
// AUTHOR: Rob Tillaart
// VERSION: 1.8.4
// VERSION: 1.8.5
// PURPOSE: Arduino Library for external I2C EEPROM 24LC256 et al.
// URL: https://github.com/RobTillaart/I2C_EEPROM
@ -11,7 +11,7 @@
#include "Wire.h"
#define I2C_EEPROM_VERSION (F("1.8.4"))
#define I2C_EEPROM_VERSION (F("1.8.5"))
#define I2C_DEVICESIZE_24LC512 65536
#define I2C_DEVICESIZE_24LC256 32768

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/I2C_EEPROM.git"
},
"version": "1.8.4",
"version": "1.8.5",
"license": "MIT",
"frameworks": "*",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=I2C_EEPROM
version=1.8.4
version=1.8.5
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library for I2C EEPROMS