mirror of
https://github.com/eclipse/upm.git
synced 2025-07-12 14:51:12 +03:00
misc: Minor fixes due to previous rebase
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
428bac360b
commit
5e72c4febd
@ -45,13 +45,6 @@ MPL3115A2::MPL3115A2 (int bus, int devAddr, uint8_t mode) : m_i2ControlCtx(bus)
|
||||
m_controlAddr = devAddr;
|
||||
m_bus = bus;
|
||||
|
||||
if ( !(m_i2ControlCtx = mraa_i2c_init(m_bus)) )
|
||||
{
|
||||
throw std::invalid_argument(std::string(__FUNCTION__) +
|
||||
": mraa_i2c_init() failed");
|
||||
return;
|
||||
}
|
||||
|
||||
mraa::Result ret = m_i2ControlCtx.address(m_controlAddr);
|
||||
if (ret != mraa::SUCCESS) {
|
||||
throw std::runtime_error(std::string(__FUNCTION__) +
|
||||
@ -309,7 +302,7 @@ MPL3115A2::i2cWriteReg (uint8_t reg, uint8_t value) {
|
||||
m_i2ControlCtx.address (m_controlAddr);
|
||||
error = m_i2ControlCtx.write (data, 2);
|
||||
|
||||
if (error != MRAA_SUCCESS)
|
||||
if (error != mraa::SUCCESS)
|
||||
throw std::runtime_error(std::string(__FUNCTION__) +
|
||||
":mraa_i2c_write() failed");
|
||||
return error;
|
||||
|
Reference in New Issue
Block a user