Fork of MAX14690 library
Fork of MAX14690 by
Diff: MAX14690.cpp
- Revision:
- 13:dff55b34fe1f
- Parent:
- 10:32c7e2ab67aa
--- a/MAX14690.cpp Sat Nov 19 00:32:54 2016 +0000 +++ b/MAX14690.cpp Tue Dec 06 19:52:05 2016 +0000 @@ -346,6 +346,23 @@ } //****************************************************************************** +int MAX14690::readAllReg(char *data, size_t len) +{ + int rtnVal = MAX14690_ERROR; + char writeData[] = {0}; + + if(len >= 32) + { + if(i2c->write(MAX14690_I2C_ADDR, writeData, sizeof(writeData)) == 0) + { + rtnVal = i2c->read(MAX14690_I2C_ADDR, data, len); + } + } + + return rtnVal; +} + +//****************************************************************************** int MAX14690::mv2bits(int mV) { int regBits;