mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
lcd: Renamed 'i2clcd' library to 'lcd'
All other upm library directories match their corresponding library name, the i2clcd was an outlier which caused problems for CMake and testing. * Replaced usage of i2clcd with lcd * Renamed source files and examples * Updated examples to use correct class * Updated documentation where necessary (left changelog sections) Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
parent
f64060b9d2
commit
3cfea676e2
@ -138,7 +138,7 @@ unable to compile code that was working fine before a library update, make sure
|
||||
you check the [API changes](docs/apichanges.md) section first.
|
||||
|
||||
**NOTE** - Several important API changes are currently underway for some of our
|
||||
widely used libraries including `libupm-grove` and `libupm-i2clcd`!
|
||||
widely used libraries including `libupm-grove`
|
||||
|
||||
### Changelog
|
||||
Version changelog [here](docs/changelog.md).
|
||||
|
@ -138,13 +138,13 @@ compatibility between releases:
|
||||
* **lcm1602/jhd1313m1** These drivers had been rewritten in C, with
|
||||
C++ wrappers and placed into their own libraries in the previous
|
||||
version of UPM, however, the original C++ implementation was kept in
|
||||
the lcd/i2clcd library for compatibility reasons with existing code.
|
||||
the lcd library for compatibility reasons with existing code.
|
||||
To avoid collisions with the header files, the new *lcm1602* and
|
||||
*jhd1313m1* drivers had their C++ headers renamed to use a **.hxx**
|
||||
suffix.
|
||||
|
||||
In this version of UPM, the *lcm1602* and *jhd1313m1* drivers have
|
||||
been removed from the lcd/i2clcd library. In addition, the header
|
||||
been removed from the lcd library. In addition, the header
|
||||
files for the new implementation have been renamed from their
|
||||
**.hxx** suffix to the normal **.hpp** suffix.
|
||||
|
||||
|
@ -106,22 +106,22 @@ make install
|
||||
Often developers are only interested in building one module or even just the
|
||||
python/node module to do some quick testing using scripting. In order to do
|
||||
this you need to use the target name for the python or node module you want to
|
||||
rebuild. For example the lcd module target name is i2clcd. Therefore the python
|
||||
module target name will be prefixed by _pyupm_. Just do the following to build
|
||||
only that module. Modules not using the UPM cmake macros may have different
|
||||
naming.
|
||||
rebuild. For example, the lcd module target will have a python2 target prefixed
|
||||
by _pyupm_ (_pyupm_lcd-python2). Modules not using the UPM cmake macros may
|
||||
have different naming. To build the python2 lcd module (and all dependencies),
|
||||
use the following make target:
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
make _pyupm_i2clcd
|
||||
make _pyupm_lcd-python2
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Sometimes you want to build a small C++ example against an installed library.
|
||||
This is fairly easy if installed system-wide. Just link against the correct
|
||||
library (in this case libupm-i2clcd) and then add /usr/include/upm to the
|
||||
library (in this case libupm-lcd) and then add /usr/include/upm to the
|
||||
loader path:
|
||||
|
||||
~~~~~~~~~~~~
|
||||
g++ test.cxx -lupm-i2clcd -I/usr/include/upm
|
||||
g++ test.cxx -lupm-lcd -I/usr/include/upm
|
||||
~~~~~~~~~~~~
|
||||
|
||||
You can also use pkg-config to return the information to you, which is
|
||||
@ -129,7 +129,7 @@ considered the correct way if including UPM in a build system like cmake or
|
||||
autotools on linux.
|
||||
|
||||
~~~~~~~~~~~
|
||||
pkg-config --cflags --libs upm-i2clcd
|
||||
pkg-config --cflags --libs upm-lcd
|
||||
~~~~~~~~~~~
|
||||
|
||||
## Building for Android Things
|
||||
|
@ -59,8 +59,8 @@ rpr220.cxx RPR220Sample.java rpr220.js rpr220.py
|
||||
rpr220-intr.cxx RPR220_intrSample.java rpr220-intr.js rpr220-intr.py
|
||||
slide.cxx SlideSample.java slide.js slide.py
|
||||
speaker.cxx SpeakerSample.java speaker.js speaker.py
|
||||
i2clcd-ssd1308-oled.cxx SSD1308_oledSample.java ssd1308-oled.js ssd1308-oled.py
|
||||
i2clcd-ssd1327-oled.cxx SSD1327_oledSample.java ssd1327-oled.js ssd1327-oled.py
|
||||
lcd-ssd1308-oled.cxx SSD1308_oledSample.java ssd1308-oled.js ssd1308-oled.py
|
||||
lcd-ssd1327-oled.cxx SSD1327_oledSample.java ssd1327-oled.js ssd1327-oled.py
|
||||
st7735.cxx ST7735Sample.java st7735.js st7735.py
|
||||
stepmotor.cxx StepMotorSample.java stepmotor.js stepmotor.py
|
||||
tm1637.cxx TM1637Sample.java tm1637.js tm1637.py
|
||||
|
@ -41,7 +41,7 @@
|
||||
# a110x.c Requires libupmc-a110x
|
||||
# lcm1602-i2c.c Requires libupmc-lcm1602
|
||||
# bmp280-bme280.c Requires libupmc-bmp280
|
||||
# i2clcd-eboled.cxx Requires libupm-i2clcd
|
||||
# lcd-eboled.cxx Requires libupm-lcd
|
||||
#
|
||||
#
|
||||
function (add_example example_src)
|
||||
|
@ -198,8 +198,8 @@ add_example_with_path(Jhd1313m1_lcdSample jhd1313m1 jhd1313m1)
|
||||
add_example_with_path(Jhd1313m1Sample jhd1313m1 jhd1313m1)
|
||||
add_example_with_path(Lcm1602_i2cSample lcm1602 lcm1602)
|
||||
add_example_with_path(Lcm1602_parallelSample lcm1602 lcm1602)
|
||||
add_example_with_path(SSD1308_oledSample lcd i2clcd)
|
||||
add_example_with_path(SSD1327_oledSample lcd i2clcd)
|
||||
add_example_with_path(SSD1308_oledSample lcd lcd)
|
||||
add_example_with_path(SSD1327_oledSample lcd lcd)
|
||||
add_example_multiple_jars(BME280_Example bmp280 "bmp280;interfaces")
|
||||
|
||||
if(SWIG_VERSION VERSION_GREATER 3.0.8)
|
||||
|
@ -22,13 +22,13 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
public class I2CLCD_EBOLEDSample {
|
||||
public class LCD_EBOLEDSample {
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
|
||||
// Instantiate an Edison Block OLED using default values
|
||||
upm_i2clcd.EBOLED lcd = new upm_i2clcd.EBOLED();
|
||||
upm_lcd.EBOLED lcd = new upm_lcd.EBOLED();
|
||||
|
||||
lcd.clear();
|
||||
lcd.setCursor(10, 15);
|
@ -22,7 +22,7 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
public class I2CLCD_SSD1306Sample {
|
||||
public class LCD_SSD1306Sample {
|
||||
|
||||
static private final int[] intel_logo = new int[]{
|
||||
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,
|
||||
@ -85,7 +85,7 @@ public class I2CLCD_SSD1306Sample {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
|
||||
upm_i2clcd.SSD1306 lcd = new upm_i2clcd.SSD1306(0x0, 0x3D);
|
||||
upm_lcd.SSD1306 lcd = new upm_lcd.SSD1306(0x0, 0x3D);
|
||||
|
||||
byte[] image = new byte[intel_logo.length];
|
||||
for (int i = 0; i < intel_logo.length; i++)
|
@ -76,7 +76,7 @@ public class SSD1308_oledSample {
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
upm_i2clcd.SSD1308 lcd = new upm_i2clcd.SSD1308(0);
|
||||
upm_lcd.SSD1308 lcd = new upm_lcd.SSD1308(0);
|
||||
|
||||
byte[] image = new byte[IntelLogo.length];
|
||||
for (int i = 0; i < IntelLogo.length; i++)
|
||||
|
@ -111,7 +111,7 @@ public class SSD1327_oledSample {
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
upm_i2clcd.SSD1327 lcd = new upm_i2clcd.SSD1327(0);
|
||||
upm_lcd.SSD1327 lcd = new upm_lcd.SSD1327(0);
|
||||
|
||||
// If you don't set the display to be white, the seeed logo will appear
|
||||
// jagged
|
||||
|
@ -25,7 +25,7 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
var lcdObj = require('jsupm_i2clcd');
|
||||
var lcdObj = require('jsupm_lcd');
|
||||
var oled = new lcdObj.EBOLED();
|
||||
|
||||
var sample = 0;
|
||||
|
@ -88,8 +88,8 @@ function exit()
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Load i2clcd module
|
||||
var lcdObj = require('jsupm_i2clcd');
|
||||
// Load lcd module
|
||||
var lcdObj = require('jsupm_lcd');
|
||||
var lcd = new lcdObj.SSD1306(0, 0x3C);
|
||||
var next = 0;
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
//Load i2clcd module
|
||||
var LCD = require('jsupm_i2clcd');
|
||||
//Load lcd module
|
||||
var LCD = require('jsupm_lcd');
|
||||
|
||||
var myLcd = new LCD.SSD1308 (0, 0x3C);
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
//Load i2clcd module
|
||||
var LCD = require('jsupm_i2clcd');
|
||||
//Load lcd module
|
||||
var LCD = require('jsupm_lcd');
|
||||
|
||||
var myLcd = new LCD.SSD1327 (0, 0x3C);
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
from __future__ import print_function
|
||||
import time, sys
|
||||
|
||||
from upm import pyupm_i2clcd as lcdObj
|
||||
from upm import pyupm_lcd as lcdObj
|
||||
|
||||
def main():
|
||||
# setup with default values
|
||||
|
@ -21,10 +21,10 @@
|
||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# Load i2clcd display module
|
||||
# Load lcd display module
|
||||
from __future__ import print_function
|
||||
import time, signal, sys
|
||||
from upm import pyupm_i2clcd as upmLCD
|
||||
from upm import pyupm_lcd as upmLCD
|
||||
|
||||
def main():
|
||||
myLCD = upmLCD.SSD1308(0, 0x3C);
|
||||
|
@ -21,10 +21,10 @@
|
||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# Load i2clcd display module
|
||||
# Load lcd display module
|
||||
from __future__ import print_function
|
||||
import time, signal, sys
|
||||
from upm import pyupm_i2clcd as upmLCD
|
||||
from upm import pyupm_lcd as upmLCD
|
||||
|
||||
def main():
|
||||
myLCD = upmLCD.SSD1327(0, 0x3C);
|
||||
|
@ -1,4 +1,4 @@
|
||||
set (libname "i2clcd")
|
||||
set (libname "lcd")
|
||||
set (libdescription "OLED Display Library")
|
||||
set (module_src lcd.cxx ssd1308.cxx eboled.cxx ssd1327.cxx ssd1306.cxx)
|
||||
set (module_hpp lcd.hpp ssd1308.hpp eboled.hpp ssd1327.hpp ssd.hpp ssd1306.hpp)
|
||||
|
@ -54,7 +54,7 @@ namespace upm
|
||||
const int BUFFER_SIZE = 192;
|
||||
|
||||
/**
|
||||
* @library i2clcd
|
||||
* @library lcd
|
||||
* @sensor eboled
|
||||
* @comname SparkFun Block for Intel Edison - OLED
|
||||
* @altname ssd1306
|
||||
@ -79,7 +79,7 @@ namespace upm
|
||||
* <a href=https://creativecommons.org/licenses/by-nc-sa/3.0/>
|
||||
* CC BY-NC-SA-3.0</a>.</em>
|
||||
*
|
||||
* @snippet i2clcd-eboled.cxx Interesting
|
||||
* @snippet lcd-eboled.cxx Interesting
|
||||
*/
|
||||
class EBOLED : public LCD
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
%module javaupm_i2clcd
|
||||
%module javaupm_lcd
|
||||
%include "../upm.i"
|
||||
%include "stdint.i"
|
||||
%include "typemaps.i"
|
@ -1,4 +1,4 @@
|
||||
%module jsupm_i2clcd
|
||||
%module jsupm_lcd
|
||||
%include "../upm.i"
|
||||
%include "../carrays_uint8_t.i"
|
||||
|
@ -31,7 +31,7 @@ namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief I2C LCD Display library
|
||||
* @defgroup i2clcd libupm-i2clcd
|
||||
* @defgroup lcd libupm-lcd
|
||||
* @ingroup dfrobot sainsmart seeed sparkfun adafruit i2c gpio display gsk
|
||||
*/
|
||||
class LCD
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Include doxygen-generated documentation
|
||||
%include "pyupm_doxy2swig.i"
|
||||
%module pyupm_i2clcd
|
||||
%module pyupm_lcd
|
||||
%include "../upm.i"
|
||||
%include "../carrays_uint8_t.i"
|
||||
|
@ -85,7 +85,7 @@ const uint8_t SSD1306_LCDWIDTH = 128;
|
||||
const uint8_t SSD1306_LCDHEIGHT = 64;
|
||||
|
||||
/**
|
||||
* @library i2clcd
|
||||
* @library lcd
|
||||
* @sensor ssd1306
|
||||
* @comname OLED Display
|
||||
* @altname Adafruit SSD1306 OLED Display 0.96"
|
||||
@ -103,7 +103,7 @@ const uint8_t SSD1306_LCDHEIGHT = 64;
|
||||
* SSD1306 device from eBay.
|
||||
*
|
||||
* @image html ssd1306.jpeg
|
||||
* @snippet i2clcd-ssd1306-oled.cxx Interesting
|
||||
* @snippet lcd-ssd1306-oled.cxx Interesting
|
||||
*/
|
||||
class SSD1306 : public LCD
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ namespace upm
|
||||
const uint8_t DISPLAY_CMD_SET_NORMAL_1308 = 0xA6;
|
||||
|
||||
/**
|
||||
* @library i2clcd
|
||||
* @library lcd
|
||||
* @sensor ssd1308
|
||||
* @comname OLED Display
|
||||
* @altname Grove OLED Display 0.96"
|
||||
@ -51,7 +51,7 @@ const uint8_t DISPLAY_CMD_SET_NORMAL_1308 = 0xA6;
|
||||
* Display module, which is an OLED monochrome display.
|
||||
*
|
||||
* @image html ssd1308.jpeg
|
||||
* @snippet i2clcd-ssd1308-oled.cxx Interesting
|
||||
* @snippet lcd-ssd1308-oled.cxx Interesting
|
||||
*/
|
||||
class SSD1308 : public LCD
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ namespace upm
|
||||
const uint8_t DISPLAY_CMD_SET_NORMAL = 0xA4;
|
||||
|
||||
/**
|
||||
* @library i2clcd
|
||||
* @library lcd
|
||||
* @sensor ssd1327
|
||||
* @comname OLED Display
|
||||
* @altname Grove OLED Display 1.12"
|
||||
@ -50,7 +50,7 @@ const uint8_t DISPLAY_CMD_SET_NORMAL = 0xA4;
|
||||
* which is an OLED monochrome display.
|
||||
*
|
||||
* @image html ssd1327.jpeg
|
||||
* @snippet i2clcd-ssd1327-oled.cxx Interesting
|
||||
* @snippet lcd-ssd1327-oled.cxx Interesting
|
||||
*/
|
||||
class SSD1327 : public LCD
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user