diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/SoftwareSerial/src/SoftwareSerial.cpp | 2 | ||||
-rw-r--r-- | libraries/Wire/src/utility/twi.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.cpp b/libraries/SoftwareSerial/src/SoftwareSerial.cpp index 376762e..474fe4a 100644 --- a/libraries/SoftwareSerial/src/SoftwareSerial.cpp +++ b/libraries/SoftwareSerial/src/SoftwareSerial.cpp @@ -270,7 +270,7 @@ void SoftwareSerial::setTX(uint8_t tx) {
// First write, then set output. If we do this the other way around,
// the pin would be output low for a short while before switching to
- // output hihg. Now, it is input with pullup for a short while, which
+ // output high. Now, it is input with pullup for a short while, which
// is fine. With inverse logic, either order is fine.
digitalWrite(tx, _inverse_logic ? LOW : HIGH);
pinMode(tx, OUTPUT);
diff --git a/libraries/Wire/src/utility/twi.c b/libraries/Wire/src/utility/twi.c index f5d7d5b..171af73 100644 --- a/libraries/Wire/src/utility/twi.c +++ b/libraries/Wire/src/utility/twi.c @@ -304,7 +304,7 @@ uint8_t twi_transmit(const uint8_t* data, uint8_t length) uint8_t i; // ensure data will fit into buffer - if(TWI_BUFFER_LENGTH < length){ + if(TWI_BUFFER_LENGTH < (twi_txBufferLength+length)){ return 1; } @@ -314,10 +314,10 @@ uint8_t twi_transmit(const uint8_t* data, uint8_t length) } // set length and copy data into tx buffer - twi_txBufferLength = length; for(i = 0; i < length; ++i){ - twi_txBuffer[i] = data[i]; + twi_txBuffer[twi_txBufferLength+i] = data[i]; } + twi_txBufferLength += length; return 0; } |