mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
mcp9808: 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
dc93fb11ff
commit
bde7259ee8
@ -22,11 +22,9 @@
|
|||||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "mcp9808.hpp"
|
#include "mcp9808.hpp"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <syslog.h>
|
||||||
|
|
||||||
using namespace upm;
|
using namespace upm;
|
||||||
|
|
||||||
@ -47,8 +45,7 @@ MCP9808::MCP9808 (int bus, uint8_t address){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(i2c->frequency( mraa::I2C_FAST) != mraa::SUCCESS){
|
if(i2c->frequency( mraa::I2C_FAST) != mraa::SUCCESS){
|
||||||
throw std::invalid_argument(std::string(__FUNCTION__) + ": I2c.frequency(I2C_STD) failed");
|
syslog(LOG_WARNING, "%s: I2c.frequency(I2C_FAST) failed, using default speed", std::string(__FUNCTION__).c_str());
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user