Skip to content

Commit 016a406

Browse files
committed
Fixes I2CClassImpl begin/end to call actual I2C_Class methods
1 parent 7c4f8c3 commit 016a406

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/m5_unit_component/adapter_i2c.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,12 @@ AdapterI2C::I2CClassImpl::I2CClassImpl(m5::I2C_Class& i2c, const uint8_t addr, c
342342

343343
bool AdapterI2C::I2CClassImpl::begin()
344344
{
345-
return true; // Already initialized by M5Unified
345+
return _i2c->begin();
346346
}
347347

348348
bool AdapterI2C::I2CClassImpl::end()
349349
{
350-
return true; // Managed by M5Unified
350+
return _i2c->release();
351351
}
352352

353353
m5::hal::error::error_t AdapterI2C::I2CClassImpl::readWithTransaction(uint8_t* data, const size_t len)

0 commit comments

Comments
 (0)