Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MAX14690 by
Diff: MAX14690.cpp
- Revision:
- 15:264f38840873
- Parent:
- 13:666b6c505289
diff -r cbd2a00ff28f -r 264f38840873 MAX14690.cpp
--- a/MAX14690.cpp Tue Jul 11 18:27:54 2017 +0000
+++ b/MAX14690.cpp Mon Oct 16 19:41:16 2017 +0000
@@ -34,7 +34,7 @@
#include "MAX14690.h"
//******************************************************************************
-MAX14690::MAX14690(I2C &i2c): _i2c(i2c)
+MAX14690::MAX14690(I2C *i2c): _i2c(i2c)
{
resetToDefaults();
}
@@ -310,7 +310,7 @@
{
char cmdData[2] = { (char)reg, value };
- if (_i2c.write(MAX14690_I2C_ADDR, cmdData, sizeof(cmdData)) != 0) {
+ if ((*_i2c).write(MAX14690_I2C_ADDR, cmdData, sizeof(cmdData)) != 0) {
return MAX14690_ERROR;
}
@@ -322,11 +322,11 @@
{
char cmdData[1] = { (char)reg };
- if (_i2c.write(MAX14690_I2C_ADDR, cmdData, sizeof(cmdData)) != 0) {
+ if ((*_i2c).write(MAX14690_I2C_ADDR, cmdData, sizeof(cmdData)) != 0) {
return MAX14690_ERROR;
}
- if (_i2c.read(MAX14690_I2C_ADDR, value, 1) != 0) {
+ if ((*_i2c).read(MAX14690_I2C_ADDR, value, 1) != 0) {
return MAX14690_ERROR;
}
