Skip to content

Commit df7c028

Browse files
committed
fix error - had hard coded i2c bus instead of using the provided bus number bus
1 parent 41f3867 commit df7c028

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sfTk/sfDevFPC2534I2C_rp2.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ class sfDevFPC2534I2C_Helper : public sfDevFPC2534I2C_IRead
6464
return 0;
6565

6666
// Since we want to continue the read operation and not restart, set the restart_on_next flag to false.
67-
bool restart0 = i2c1->restart_on_next;
67+
bool restart0 = _i2cPort->restart_on_next;
6868

69-
i2c1->restart_on_next = false;
69+
_i2cPort->restart_on_next = false;
7070
int rc =
7171
i2c_read_blocking_until(_i2cPort, _device_address, data, len, false, make_timeout_time_ms(_timeOutMillis));
7272

7373
// restore the restart flag to its previous state
74-
i2c1->restart_on_next = restart0;
74+
_i2cPort->restart_on_next = restart0;
7575
_pendingStop = false;
7676

7777
// Problem?

0 commit comments

Comments
 (0)