Skip to content

Commit

Permalink
V1.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
felias-fogg committed Feb 19, 2022
1 parent 5020c6d commit 82ad22d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SoftI2CMaster",
"version": "2.1.8",
"version": "2.1.9",
"keywords": "i2c",
"description": "Software I2C Arduino library",
"repository": {
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=SoftI2CMaster
version=2.1.8
version=2.1.9
author=Bernhard Nebel, Peter Fleury
maintainer=Bernhard Nebel
sentence=I2C lib that supports bit banging and hardware support
Expand Down
5 changes: 3 additions & 2 deletions src/SoftWire.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ extern SoftWire Wire;

uint8_t SoftWire::requestFrom(uint8_t address, uint8_t quantity,
uint32_t iaddress, uint8_t isize, uint8_t sendStop) {
error = 0;
uint8_t localerror = 0;
if (isize > 0) {
// send internal address; this mode allows sending a repeated start to access
Expand Down Expand Up @@ -191,12 +192,12 @@ extern SoftWire Wire;
}
// set rx buffer iterator vars
rxBufferIndex = 0;
rxBufferLength = quantity;
rxBufferLength = error ? 0 : quantity;
if (sendStop) {
transmitting = 0;
i2c_stop();
}
return quantity;
return rxBufferLength;
}

uint8_t SoftWire::requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop) {
Expand Down

0 comments on commit 82ad22d

Please sign in to comment.