mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
lcd: rename I2CLcd class to LCD
Signed-off-by: Jon Trulson <jtrulson@ics.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
99651d2239
commit
3aaafdcecf
@ -32,7 +32,7 @@
|
||||
using namespace upm;
|
||||
|
||||
Jhd1313m1::Jhd1313m1(int bus, int lcdAddress, int rgbAddress)
|
||||
: I2CLcd(bus, lcdAddress), m_i2c_lcd_rgb(bus)
|
||||
: LCD(bus, lcdAddress), m_i2c_lcd_rgb(bus)
|
||||
{
|
||||
m_rgb_address = rgbAddress;
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace upm
|
||||
* @image html grovergblcd.jpg
|
||||
* @snippet jhd1313m1-lcd.cxx Interesting
|
||||
*/
|
||||
class Jhd1313m1 : public I2CLcd
|
||||
class Jhd1313m1 : public LCD
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
using namespace upm;
|
||||
|
||||
I2CLcd::I2CLcd(int bus, int lcdAddress) : m_i2c_lcd_control(bus)
|
||||
LCD::LCD(int bus, int lcdAddress) : m_i2c_lcd_control(bus)
|
||||
{
|
||||
m_lcd_control_address = lcdAddress;
|
||||
m_bus = bus;
|
||||
@ -41,19 +41,19 @@ I2CLcd::I2CLcd(int bus, int lcdAddress) : m_i2c_lcd_control(bus)
|
||||
}
|
||||
}
|
||||
|
||||
I2CLcd::~I2CLcd()
|
||||
LCD::~LCD()
|
||||
{
|
||||
}
|
||||
|
||||
mraa_result_t
|
||||
I2CLcd::write(int row, int column, std::string msg)
|
||||
LCD::write(int row, int column, std::string msg)
|
||||
{
|
||||
setCursor(row, column);
|
||||
return write(msg);
|
||||
}
|
||||
|
||||
mraa_result_t
|
||||
I2CLcd::createChar(uint8_t charSlot, uint8_t charData[])
|
||||
LCD::createChar(uint8_t charSlot, uint8_t charData[])
|
||||
{
|
||||
mraa_result_t error = MRAA_SUCCESS;
|
||||
charSlot &= 0x07; // only have 8 positions we can set
|
||||
@ -68,7 +68,7 @@ I2CLcd::createChar(uint8_t charSlot, uint8_t charData[])
|
||||
}
|
||||
|
||||
std::string
|
||||
I2CLcd::name()
|
||||
LCD::name()
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
@ -80,11 +80,11 @@ const uint8_t LCD_RS = 0x01; // Register select bit
|
||||
* @defgroup i2clcd libupm-i2clcd
|
||||
* @ingroup seeed sparkfun adafruit i2c display gsk
|
||||
*/
|
||||
class I2CLcd
|
||||
class LCD
|
||||
{
|
||||
public:
|
||||
I2CLcd(int bus, int lcdAddress);
|
||||
virtual ~I2CLcd();
|
||||
LCD(int bus, int lcdAddress);
|
||||
virtual ~LCD();
|
||||
mraa_result_t write(int x, int y, std::string msg);
|
||||
|
||||
virtual mraa_result_t write(std::string msg) = 0;
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
using namespace upm;
|
||||
|
||||
Lcm1602::Lcm1602(int bus_in, int addr_in) : I2CLcd(bus_in, addr_in)
|
||||
Lcm1602::Lcm1602(int bus_in, int addr_in) : LCD(bus_in, addr_in)
|
||||
{
|
||||
mraa_result_t error = MRAA_SUCCESS;
|
||||
|
||||
|
@ -52,7 +52,7 @@ namespace upm
|
||||
* @image html lcm1602.jpeg
|
||||
* @snippet lcm1602-lcd.cxx Interesting
|
||||
*/
|
||||
class Lcm1602 : public I2CLcd
|
||||
class Lcm1602 : public LCD
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
using namespace upm;
|
||||
|
||||
SSD1308::SSD1308(int bus_in, int addr_in) : I2CLcd(bus_in, addr_in)
|
||||
SSD1308::SSD1308(int bus_in, int addr_in) : LCD(bus_in, addr_in)
|
||||
{
|
||||
m_i2c_lcd_control.writeReg(LCD_CMD, DISPLAY_CMD_OFF); // display off
|
||||
usleep(4500);
|
||||
|
@ -52,7 +52,7 @@ const uint8_t DISPLAY_CMD_SET_NORMAL_1308 = 0xA6;
|
||||
* @image html ssd1308.jpeg
|
||||
* @snippet ssd1308-oled.cxx Interesting
|
||||
*/
|
||||
class SSD1308 : public I2CLcd
|
||||
class SSD1308 : public LCD
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -32,7 +32,7 @@ using namespace upm;
|
||||
#define INIT_SLEEP 50000
|
||||
#define CMD_SLEEP 10000
|
||||
|
||||
SSD1327::SSD1327(int bus_in, int addr_in) : I2CLcd(bus_in, addr_in)
|
||||
SSD1327::SSD1327(int bus_in, int addr_in) : LCD(bus_in, addr_in)
|
||||
{
|
||||
mraa_result_t error = MRAA_SUCCESS;
|
||||
usleep(INIT_SLEEP);
|
||||
|
@ -52,7 +52,7 @@ const uint8_t DISPLAY_CMD_SET_NORMAL = 0xA4;
|
||||
* @image html ssd1327.jpeg
|
||||
* @snippet ssd1327-oled.cxx Interesting
|
||||
*/
|
||||
class SSD1327 : public I2CLcd
|
||||
class SSD1327 : public LCD
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user