Library for MAX7300 GPIO Expander
Revision 6:3674af0a03cf, committed 2015-10-16
- Comitter:
- j3
- Date:
- Fri Oct 16 23:14:22 2015 +0000
- Parent:
- 5:c4d2978bdebb
- Child:
- 7:e75913818f75
- Commit message:
- fixed slave adrs in read functions, was using the write due to copy and paste, but luckily the read member function forces the lower bit to 1, so no harm done.
Changed in this revision
| max7300.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/max7300.cpp Fri Aug 14 04:26:02 2015 +0000
+++ b/max7300.cpp Fri Oct 16 23:14:22 2015 +0000
@@ -153,7 +153,7 @@
if(!result)
{
//get current port configuration register
- result = _p_i2c->read(_w_adrs, (data + 1), 1, false);
+ result = _p_i2c->read(_r_adrs, (data + 1), 1, false);
if(!result)
{
@@ -231,7 +231,7 @@
if(!result)
{
//get port data
- result = _p_i2c->read(_w_adrs, (data + 1), 1, false);
+ result = _p_i2c->read(_r_adrs, (data + 1), 1, false);
if(!result)
{
result = data[1];
@@ -279,7 +279,7 @@
if(!result)
{
//get port data
- result = _p_i2c->read(_w_adrs, (data + 1), 1, false);
+ result = _p_i2c->read(_r_adrs, (data + 1), 1, false);
if(!result)
{
result = data[1];
@@ -329,7 +329,7 @@
if(!result)
{
//get mask data
- result = _p_i2c->read(_w_adrs, (data + 1), 1, false);
+ result = _p_i2c->read(_r_adrs, (data + 1), 1, false);
if(!result)
{
if(enable_snapshot)
@@ -391,7 +391,7 @@
if(!result)
{
//get current configuration register
- result = _p_i2c->read(_w_adrs, (local_data + 1), 1, false);
+ result = _p_i2c->read(_r_adrs, (local_data + 1), 1, false);
if(!result)
{