Skip to content

Commit

Permalink
Updating I2Cdev.* files for Arduino again
Browse files Browse the repository at this point in the history
  • Loading branch information
jrowberg committed Sep 2, 2013
1 parent fc92547 commit e2fa9a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Arduino/I2Cdev/I2Cdev.cpp
Expand Up @@ -287,8 +287,6 @@ int8_t I2Cdev::readBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8
if (count + 1 < length) Serial.print(" ");
#endif
}

Wire.endTransmission();
}
#endif

Expand Down Expand Up @@ -323,7 +321,7 @@ int8_t I2Cdev::readBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8
* @param length Number of words to read
* @param data Buffer to store read data in
* @param timeout Optional read timeout in milliseconds (0 to disable, leave off to use default class value in I2Cdev::readTimeout)
* @return Number of words read (0 indicates failure)
* @return Number of words read (-1 indicates failure)
*/
int8_t I2Cdev::readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout) {
#ifdef I2CDEV_SERIAL_DEBUG
Expand Down
4 changes: 4 additions & 0 deletions Arduino/I2Cdev/I2Cdev.h
Expand Up @@ -63,6 +63,7 @@ THE SOFTWARE.
#define I2CDEV_BUILTIN_NBWIRE 2 // Tweaked Wire object from Gene Knight's NBWire project
// ^^^ NBWire implementation is still buggy w/some interrupts!
#define I2CDEV_BUILTIN_FASTWIRE 3 // FastWire object from Francesco Ferrara's project
#define I2CDEV_I2CMASTER_LIBRARY 4 // I2C object from DSSCircuits I2C-Master Library at https://github.com/DSSCircuits/I2C-Master-Library

// -----------------------------------------------------------------------------
// Arduino-style "Serial.print" debug constant (uncomment to enable)
Expand All @@ -78,6 +79,9 @@ THE SOFTWARE.
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include <Wire.h>
#endif
#if I2CDEV_IMPLEMENTATION == I2CDEV_I2CMASTER_LIBRARY
#include <I2C.h>
#endif
#endif

// 1000ms default read timeout (modify with "I2Cdev::readTimeout = [ms];")
Expand Down

0 comments on commit e2fa9a6

Please sign in to comment.