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:
Jon Trulson 2015-07-09 12:38:22 -06:00 committed by Mihai Tudor Panu
parent 99651d2239
commit 3aaafdcecf
10 changed files with 16 additions and 16 deletions

View File

@ -32,7 +32,7 @@
using namespace upm; using namespace upm;
Jhd1313m1::Jhd1313m1(int bus, int lcdAddress, int rgbAddress) 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; m_rgb_address = rgbAddress;

View File

@ -50,7 +50,7 @@ namespace upm
* @image html grovergblcd.jpg * @image html grovergblcd.jpg
* @snippet jhd1313m1-lcd.cxx Interesting * @snippet jhd1313m1-lcd.cxx Interesting
*/ */
class Jhd1313m1 : public I2CLcd class Jhd1313m1 : public LCD
{ {
public: public:
/** /**

View File

@ -30,7 +30,7 @@
using namespace upm; 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_lcd_control_address = lcdAddress;
m_bus = bus; 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 mraa_result_t
I2CLcd::write(int row, int column, std::string msg) LCD::write(int row, int column, std::string msg)
{ {
setCursor(row, column); setCursor(row, column);
return write(msg); return write(msg);
} }
mraa_result_t 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; mraa_result_t error = MRAA_SUCCESS;
charSlot &= 0x07; // only have 8 positions we can set charSlot &= 0x07; // only have 8 positions we can set
@ -68,7 +68,7 @@ I2CLcd::createChar(uint8_t charSlot, uint8_t charData[])
} }
std::string std::string
I2CLcd::name() LCD::name()
{ {
return m_name; return m_name;
} }

View File

@ -80,11 +80,11 @@ const uint8_t LCD_RS = 0x01; // Register select bit
* @defgroup i2clcd libupm-i2clcd * @defgroup i2clcd libupm-i2clcd
* @ingroup seeed sparkfun adafruit i2c display gsk * @ingroup seeed sparkfun adafruit i2c display gsk
*/ */
class I2CLcd class LCD
{ {
public: public:
I2CLcd(int bus, int lcdAddress); LCD(int bus, int lcdAddress);
virtual ~I2CLcd(); virtual ~LCD();
mraa_result_t write(int x, int y, std::string msg); mraa_result_t write(int x, int y, std::string msg);
virtual mraa_result_t write(std::string msg) = 0; virtual mraa_result_t write(std::string msg) = 0;

View File

@ -32,7 +32,7 @@
using namespace upm; 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; mraa_result_t error = MRAA_SUCCESS;

View File

@ -52,7 +52,7 @@ namespace upm
* @image html lcm1602.jpeg * @image html lcm1602.jpeg
* @snippet lcm1602-lcd.cxx Interesting * @snippet lcm1602-lcd.cxx Interesting
*/ */
class Lcm1602 : public I2CLcd class Lcm1602 : public LCD
{ {
public: public:
/** /**

View File

@ -29,7 +29,7 @@
using namespace upm; 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 m_i2c_lcd_control.writeReg(LCD_CMD, DISPLAY_CMD_OFF); // display off
usleep(4500); usleep(4500);

View File

@ -52,7 +52,7 @@ const uint8_t DISPLAY_CMD_SET_NORMAL_1308 = 0xA6;
* @image html ssd1308.jpeg * @image html ssd1308.jpeg
* @snippet ssd1308-oled.cxx Interesting * @snippet ssd1308-oled.cxx Interesting
*/ */
class SSD1308 : public I2CLcd class SSD1308 : public LCD
{ {
public: public:
/** /**

View File

@ -32,7 +32,7 @@ using namespace upm;
#define INIT_SLEEP 50000 #define INIT_SLEEP 50000
#define CMD_SLEEP 10000 #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; mraa_result_t error = MRAA_SUCCESS;
usleep(INIT_SLEEP); usleep(INIT_SLEEP);

View File

@ -52,7 +52,7 @@ const uint8_t DISPLAY_CMD_SET_NORMAL = 0xA4;
* @image html ssd1327.jpeg * @image html ssd1327.jpeg
* @snippet ssd1327-oled.cxx Interesting * @snippet ssd1327-oled.cxx Interesting
*/ */
class SSD1327 : public I2CLcd class SSD1327 : public LCD
{ {
public: public:
/** /**