Skip to content

Commit

Permalink
Fix #72, parameter type requestFrom()
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Apr 22, 2024
1 parent 6c3cb30 commit 35c28ad
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ 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)
- improve readability: cnt => count addr => address
- add URL to examples
- minor edits.


## [1.8.3] - 2024-03-28
- Fix #64, compiler warning.
- add **verifyBlock(memoryAddress, buffer, length)**
Expand Down
10 changes: 5 additions & 5 deletions I2C_eeprom.cpp
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions I2C_eeprom.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=I2C_EEPROM
version=1.8.4
version=1.8.5
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=Library for I2C EEPROMS
Expand Down

0 comments on commit 35c28ad

Please sign in to comment.