mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
ssd1306: 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
bde7259ee8
commit
2b642ab7a4
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "hd44780_bits.hpp"
|
#include "hd44780_bits.hpp"
|
||||||
#include "ssd1306.hpp"
|
#include "ssd1306.hpp"
|
||||||
@ -55,9 +56,7 @@ SSD1306::SSD1306(int bus_in, int addr_in) : m_i2c_lcd_control(bus_in)
|
|||||||
error = m_i2c_lcd_control.frequency(mraa::I2C_FAST);
|
error = m_i2c_lcd_control.frequency(mraa::I2C_FAST);
|
||||||
|
|
||||||
if (error != mraa::SUCCESS) {
|
if (error != mraa::SUCCESS) {
|
||||||
throw std::invalid_argument(std::string(__FUNCTION__) +
|
syslog(LOG_WARNING, "%s: mraa_i2c_frequency(MRAA_I2C_FAST) failed, using default speed", std::string(__FUNCTION__).c_str());
|
||||||
": mraa_i2c_frequency(MRAA_I2C_FAST) failed");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_i2c_lcd_control.writeReg(LCD_CMD, DISPLAY_CMD_OFF); // display off
|
m_i2c_lcd_control.writeReg(LCD_CMD, DISPLAY_CMD_OFF); // display off
|
||||||
|
Loading…
x
Reference in New Issue
Block a user