mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +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
@ -40,13 +40,6 @@ HTU21D::HTU21D(int bus, int devAddr) : m_i2ControlCtx(bus) {
|
||||
|
||||
m_controlAddr = devAddr;
|
||||
m_bus = bus;
|
||||
|
||||
if ( (m_i2ControlCtx == NULL) )
|
||||
{
|
||||
throw std::invalid_argument(std::string(__FUNCTION__) +
|
||||
": mraa_i2c_init() failed");
|
||||
return;
|
||||
}
|
||||
|
||||
mraa::Result ret = m_i2ControlCtx.address(m_controlAddr);
|
||||
if (ret != mraa::SUCCESS) {
|
||||
@ -217,15 +210,11 @@ HTU21D::i2cWriteReg (uint8_t reg, uint8_t value) {
|
||||
mraa::Result error = mraa::SUCCESS;
|
||||
|
||||
uint8_t data[2] = { reg, value };
|
||||
<<<<<<< HEAD
|
||||
m_i2ControlCtx.address (m_controlAddr);
|
||||
error = m_i2ControlCtx.write (data, 2);
|
||||
=======
|
||||
mraa_i2c_address (m_i2ControlCtx, m_controlAddr);
|
||||
if ( mraa_i2c_write(m_i2ControlCtx, data, 2) != MRAA_SUCCESS)
|
||||
if ( error != mraa::SUCCESS)
|
||||
throw std::invalid_argument(std::string(__FUNCTION__) +
|
||||
": mraa_i2c_write() failed");
|
||||
>>>>>>> f09bf63... htu21d: throw exception(s) on fatal errors
|
||||
|
||||
return error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user