mirror of
https://github.com/eclipse/upm.git
synced 2025-07-03 18:31:13 +03:00
lcd: remove i2c context from LCD base class
This commit removes the I2C context from the LCD base class and moves it into each of the drivers. In addition, the createChar() virtual function was removed from the base class, as it directly used the now non-existant i2c context, and it would not work on anything other than hd44780 based controllers and displays anyway. Also, it is likely the capability itself, as well as the data required to implement it, is going to be different from device to device. createChar() has been added to the Lcm1602 driver which can support it. While doing this work, the LCD base class m_name is now set appropriately in the driver constructors. Signed-off-by: Jon Trulson <jtrulson@ics.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
56f7e97536
commit
1647f572ff
@ -25,6 +25,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <mraa/i2c.hpp>
|
||||
#include "lcd.h"
|
||||
#include "ssd.h"
|
||||
|
||||
@ -108,5 +109,8 @@ class SSD1308 : public LCD
|
||||
mraa_result_t writeChar(uint8_t value);
|
||||
mraa_result_t setNormalDisplay();
|
||||
mraa_result_t setAddressingMode(displayAddressingMode mode);
|
||||
|
||||
int m_lcd_control_address;
|
||||
mraa::I2c m_i2c_lcd_control;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user