i2c_scanner() should use _write() not _read()
This commit is contained in:
@ -26,7 +26,7 @@ void i2c_scanner(struct mgos_i2c *i2c, bool dumpregs) {
|
||||
|
||||
for (i = 0x3; i < 0x78; i++) {
|
||||
bool ret;
|
||||
ret = mgos_i2c_read(i2c, i, NULL, 0, true);
|
||||
ret = mgos_i2c_write(i2c, i, NULL, 0, true);
|
||||
if (ret) {
|
||||
LOG(LL_INFO, ("Found device at I2C address 0x%02x", i));
|
||||
if (dumpregs) {
|
||||
|
Reference in New Issue
Block a user