mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
ads1x15: failed i2c frequency change should be non-fatal for this device
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
e689dc175c
commit
19d1af6a48
@ -26,6 +26,7 @@
|
||||
#include "ads1x15.hpp"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
|
||||
using namespace upm;
|
||||
|
||||
@ -42,8 +43,7 @@ ADS1X15::ADS1X15(int bus, uint8_t address){
|
||||
}
|
||||
|
||||
if(i2c->frequency( mraa::I2C_FAST) != mraa::SUCCESS){
|
||||
throw std::invalid_argument(std::string(__FUNCTION__) + ": I2c.frequency(I2C_FAST) failed");
|
||||
return;
|
||||
syslog(LOG_WARNING, "%s: I2c.frequency(I2C_FAST) failed, using default speed", std::string(__FUNCTION__).c_str());
|
||||
}
|
||||
//Will be reset by sub class.
|
||||
m_bitShift = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user