lcd: overhaul documentation for lcd module

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-08-07 19:15:49 +01:00
parent 586acf7502
commit 9c9b273b5a
8 changed files with 229 additions and 55 deletions

View File

@ -27,9 +27,11 @@
int
main(int argc, char **argv)
{
//! [Interesting]
upm::Lcm1602* lcd = new upm::Lcm1602(0, 0x27);
lcd->setCursor(0,0);
lcd->write("Hello World");
//! [Interesting]
lcd->setCursor(1,2);
lcd->write("Hello World");
lcd->setCursor(2,4);

View File

@ -83,13 +83,16 @@ static uint8_t intel_logo[] = {
63, 63, 63, 63, 63, 31, 31, 31, 31, 31, 15, 15, 15, 15, 7, 7, 7, 7, 3, 3,
3, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0 };
int
main(int argc, char **argv)
{
upm::SSD1308 *lcd = new upm::SSD1308 (BUS_NUMBER, DEVICE_ADDRESS);
//! [Interesting]
upm::SSD1308 *lcd = new upm::SSD1308(BUS_NUMBER, DEVICE_ADDRESS);
lcd->clear ();
lcd->draw (intel_logo, 1024);
lcd->clear();
lcd->draw(intel_logo, 1024);
lcd->close ();
lcd->close();
//! [Interesting]
}

View File

@ -106,21 +106,19 @@ static uint8_t SeeedLogo[] ={
int
main(int argc, char **argv)
{
upm::SSD1327 *lcd = new upm::SSD1327 (BUS_NUMBER, 0x3C);
//! [Interesting]
upm::SSD1327 *lcd = new upm::SSD1327(BUS_NUMBER, 0x3C);
/*
* Simple print hello world
*/
for(uint8_t i = 0; i < 12 ; i++) {
lcd->setCursor (i, 0);
lcd->setGrayLevel (i);
lcd->write ("Hello World");
// Simple print hello world
for (uint8_t i = 0; i < 12; i++) {
lcd->setCursor(i, 0);
lcd->setGrayLevel(i);
lcd->write("Hello World");
}
/*
* Simple print hello world
*/
lcd->draw (SeeedLogo, 96 * 96 / 8);
// Simple print hello world
lcd->draw(SeeedLogo, 96 * 96 / 8);
lcd->close ();
lcd->close();
//! [Interesting]
}

View File

@ -27,6 +27,7 @@
int
main(int argc, char **argv)
{
//! [Interesting]
// 0x62 RGB_ADDRESS, 0x3E LCD_ADDRESS
upm::Jhd1313m1 *lcd = new upm::Jhd1313m1(0, 0x3E, 0x62);
lcd->setCursor(0,0);
@ -34,4 +35,5 @@ main(int argc, char **argv)
lcd->setCursor(1,2);
lcd->write("Hello World");
lcd->close();
//! [Interesting]
}