mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
lcm1602: small patches to comments and examples
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
1713d44a4b
commit
1040b4e51f
@ -9,7 +9,8 @@ add_executable (grovetemp-example grovetemp.cxx)
|
||||
add_executable (grovebutton-example grovebutton.cxx)
|
||||
add_executable (groverotary-example groverotary.cxx)
|
||||
add_executable (groveslide-example groveslide.cxx)
|
||||
add_executable (lcm1602-lcd-example lcm1602-lcd.cxx)
|
||||
add_executable (lcm1602-i2c-example lcm1602-i2c.cxx)
|
||||
add_executable (lcm1602-parallel-example lcm1602-parallel.cxx)
|
||||
add_executable (jhd1313m1-lcd-example jhd1313m1-lcd.cxx)
|
||||
add_executable (buzzer-sound-example buzzer-sound.cxx)
|
||||
add_executable (my9221-ledbar-example my9221-ledbar.cxx)
|
||||
@ -266,7 +267,8 @@ target_link_libraries (grovetemp-example grove ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (grovebutton-example grove ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (groverotary-example grove ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (groveslide-example grove ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (lcm1602-lcd-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (lcm1602-i2c-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (lcm1602-parallel-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (jhd1313m1-lcd-example i2clcd ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (buzzer-sound-example buzzer ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries (my9221-ledbar-example my9221 ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
@ -32,12 +32,16 @@ main(int argc, char **argv)
|
||||
lcd->setCursor(0,0);
|
||||
lcd->write("Hello World");
|
||||
//! [Interesting]
|
||||
sleep(3);
|
||||
lcd->setCursor(1,2);
|
||||
lcd->write("Hello World");
|
||||
sleep(3);
|
||||
lcd->setCursor(2,4);
|
||||
lcd->write("Hello World");
|
||||
sleep(3);
|
||||
lcd->setCursor(3,6);
|
||||
lcd->write("Hello World");
|
||||
sleep(3);
|
||||
delete lcd;
|
||||
|
||||
return 0;
|
@ -23,7 +23,7 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <upm/lcm1602.h>
|
||||
#include <lcm1602.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
@ -32,7 +32,7 @@ namespace upm
|
||||
/**
|
||||
* @brief I2C LCD Display library
|
||||
* @defgroup i2clcd libupm-i2clcd
|
||||
* @ingroup seeed sparkfun adafruit i2c display gsk
|
||||
* @ingroup seeed sparkfun adafruit i2c gpio display gsk
|
||||
*/
|
||||
class LCD
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
* Copyright (c) 2014 Intel Corporation.
|
||||
*
|
||||
* Contributions: Jon Trulson <jtrulson@ics.com>
|
||||
* Sergey Kiselev <sergey.kiselev@intel.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
|
@ -8,6 +8,7 @@
|
||||
* Copyright (c) 2014 Intel Corporation.
|
||||
*
|
||||
* Contributions: Jon Trulson <jtrulson@ics.com>
|
||||
* Sergey Kiselev <sergey.kiselev@intel.com>
|
||||
*
|
||||
* Permission is hereby granted, free of uint8_tge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
@ -46,9 +47,9 @@ namespace upm
|
||||
* @sensor lcm1602
|
||||
* @comname LCM1602 Display
|
||||
* @type display
|
||||
* @man adafruit sparkfun
|
||||
* @man adafruit sparkfun seeed
|
||||
* @web https://www.adafruit.com/datasheets/TC1602A-01T.pdf
|
||||
* @con i2c
|
||||
* @con i2c gpio
|
||||
*
|
||||
* @brief API for the LCM1602 I2C controller for HD44780-based displays
|
||||
*
|
||||
@ -56,7 +57,9 @@ namespace upm
|
||||
* controller has no idea of the actual display hardware, so it lets you write
|
||||
* farther than you can see. These displays with such controllers are available
|
||||
* from various manufacturers with different I2C addresses. Adafruit*
|
||||
* TC1602A-01T seems to be a well-documented example.
|
||||
* TC1602A-01T seems to be a well-documented example. The driver also supports
|
||||
* parallel GPIO connections directly to the HD44780 in case you are not using
|
||||
* an I2C expander/backpack.
|
||||
*
|
||||
* @image html lcm1602.jpeg
|
||||
* @snippet lcm1602-lcd.cxx Interesting
|
||||
@ -70,13 +73,13 @@ class Lcm1602 : public LCD
|
||||
* @param bus I2C bus to use
|
||||
* @param address Slave address the LCD is registered on
|
||||
* @param isExpander True if we are dealing with an I2C expander,
|
||||
* false otherwise. Default is true.
|
||||
* false otherwise. Default is true.
|
||||
*/
|
||||
Lcm1602(int bus, int address, bool isExpander=true,
|
||||
uint8_t numColumns = 16, uint8_t numRows = 4);
|
||||
|
||||
/**
|
||||
* Lcm1602 alternate constructor, used for GPIO based hd44780
|
||||
* Lcm1602 alternate constructor, used for GPIO based HD44780
|
||||
* controllers supporting RS, Enable, and 4 data pins in 4-bit
|
||||
* mode.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user