113 Commits

Author SHA1 Message Date
Stefan Andritoiu
7e2ae96c1f Added Java support and bindings
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-08-13 16:25:54 -07:00
VadimPopov
04edb9be04 docs: more header files edited
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-08-12 12:21:16 -07:00
Jon Trulson
55e8076988 eboled: Initial implementation
This driver supports the Sparkfun 64x48 pixel OLED Edison block:

https://www.sparkfun.com/products/13035

It is based on an ssd1306, but with some modifications (custom COM pin
mapping and a custom column offset).  It uses SPI to communicate, and
since it is an Edison Block, you don't really have any options for
different bus and pin assignments.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-08-12 11:20:14 -07:00
Jon Trulson
f133b6eb4c lcd: jhd1313m1: rewrite to use Lcm1602 as a base class
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-08-05 11:13:23 -07:00
Jon Trulson
cb62f06197 lcd: lcm1602: modifications for eventual use as a base class for jhd1313m1
We add a new bool isExpander to the the I2C constructor.  This allows
us (in the case we are not dealing with an expander) to just
initialize the i2c context only and bail in the constructor.  The
default is true to preserve backward compatibility.

Additionally, add two new virtual protected methods, data() and
command() for sending data or commands to the controller.  The default
implementation in lcm1602 will work for 4bit GPIO and expander use.

In the case of jhd1313m1, they will need to be redefined in that class
as the sematics for sending data and commands are different.

All of the underlying functionality will use command() or data() as
appropriate.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-08-05 11:13:15 -07:00
Jon Trulson
a2e4fb5d7a lcd: add missing functionality to lcm1602
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-08-05 11:13:00 -07:00
Mihai Tudor Panu
6613dea552 cmake: adds option to use different lib&class names with python docs
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-07-22 11:48:17 -07:00
Jon Trulson
ef173ebeaf sainsmartks: Initial Implementation
This driver was developed with a Sainsmart LCD Keypad Shield.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-07-21 17:38:52 -07:00
Jon Trulson
5a6fb122ec lcm1602: add 4-bit gpio support with RS and Enable pins
In addition, move the command/data sending methods into the protected
block so that derived classes can use them if need be.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-07-21 17:38:01 -07:00
Jon Trulson
8462e8ce52 jhd1313m1: add createChar() method, as it should be supported by this device
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-07-21 17:37:06 -07:00
Jon Trulson
1647f572ff lcd: remove i2c context from LCD base class
This commit removes the I2C context from the LCD base class and moves
it into each of the drivers.

In addition, the createChar() virtual function was removed from the
base class, as it directly used the now non-existant i2c context, and
it would not work on anything other than hd44780 based controllers and
displays anyway. Also, it is likely the capability itself, as well as
the data required to implement it, is going to be different from
device to device.

createChar() has been added to the Lcm1602 driver which can support it.

While doing this work, the LCD base class m_name is now set appropriately
in the driver constructors.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-07-21 17:36:09 -07:00
Jon Trulson
56f7e97536 lcd: move the hd44780 controller bit definitions into a separate header
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-07-21 17:35:09 -07:00
Jon Trulson
3aaafdcecf 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>
2015-07-21 17:34:13 -07:00
Jon Trulson
99651d2239 lcd: rename i2clcd.{h,cxx} to lcd.{h,cxx}
We keep the same upm module library name (i2clcd), and the header
documentation still specifies @library i2clcd.

These will need to be changed when the actual library is renamed.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-07-21 17:33:15 -07:00
Mihai Tudor Panu
0dbfa06359 jhd1313m1: modified destructor to clear and turn off lcd on delete
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-06-16 17:02:21 -07:00
Mihai Tudor Panu
2fda38f7b1 i2clcd: added virtual destructor to base lcd class
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-06-16 16:48:27 -07:00
Jon Trulson
f8179328cf ssd1327: various functions should return values
defects 377, 378, 379, 380

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-06-11 10:54:50 -07:00
Jon Trulson
eb2ff59fe5 ssd1308: writeChar(), setAddressingMode() should return a value
defect #373, 374

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-06-11 10:53:45 -07:00
Jon Trulson
3e82dd8d0a lcd: return a proper value in write()
defect #156

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-06-11 10:48:43 -07:00
Mihai Tudor Panu
14f80e779e docs: updated library descriptions and sensor names for consistency
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-06-01 17:18:27 -07:00
Mihai Tudor Panu
8614cb322a docs: removed C++ references from documentation to make API language agnostic
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-06-01 15:46:18 -07:00
Wouter van Verre
124a9eb41d i2clcd: Add ssd.h to the CMakeLists.txt file.
Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:35:35 -07:00
Wouter van Verre
479a9553f6 i2clcd: replace #define with const data inside the namespace.
This keeps the constants in the correct scope and avoid potential
naming conflicts with other files.

Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:35:01 -07:00
Wouter van Verre
31c4f470fe i2clcd: use the mraa C++ API instead of the C API
Rewrite the i2c module to be based around the MRAA C++ API,
since this makes resource management easier inside of the UPM
C++ classes.

i2clcd.{h,cxx}: remove the close() function. This now automatically gets
called when the object goes out of scope, inside the destructor.

examples/i2clcd: fix C++/Python/Javascript examples that explicitly called the close function.
The I2c context now gets called by the destructor of the sensor class. This
happens when the object goes out of scope or when it gets deleted, if the
object was created using the new keyword, as is the case here.

Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:34:27 -07:00
Wouter van Verre
53b58225a4 i2clcd: remove unused function argument from the writeChar function
The writeChar function in the ssd13xx classes had an unused argument.

Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:33:48 -07:00
Wouter van Verre
ae0d99369b i2clcd: remove the helper functions i2Cmd, i2cData & i2cReg
Remove calls to I2C helper functions (i2Cmd, i2cData, i2cReg) and call
the raw MRAA function directly instead and remove the helper functions from the
I2CLcd class

Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:33:13 -07:00
Wouter van Verre
bcdaccf68d jhd11313m1.cxx: modify the duration of the usleep calls in the constructor
The new values for the durations match the recommended values from the
datasheet more closely

Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:32:39 -07:00
Wouter van Verre
a6aa972c1c jhd1313m1.cxx: Add comment explaining why write starts with a usleep call
Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:32:05 -07:00
Wouter van Verre
67bd592ed9 i2clcd: improve error handling in the I2CLcd and Jhd1313m1 classes
Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:31:32 -07:00
Wouter van Verre
dea82728af i2clcd_private.h: Added a private header file to hold macros
Added new, private, header file which contains macros used to check the
return value of mraa function calls

Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:30:59 -07:00
Wouter van Verre
98f4bcde31 jhd1313m1.cxx: remove repeated function calls
Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:30:26 -07:00
Wouter van Verre
bb59d5db7a i2clcd: Reformat the lcd source code
Reformatted to prepare for improving the error handling. This reformatting
was done using clang-format.

Signed-off-by: Wouter van Verre <wouter.van.verre@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-23 17:29:51 -07:00
Zion Orent
99c59361a7 ssd1308: JavaScript, python examples for ssd1308 OLED Display 1.12"
Signed-off-by: Zion Orent <zorent@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-17 11:26:00 -07:00
John Van Drasek
bdaf952e91 grovergblcd: changed file name extension to match file
Signed-off-by: John Van Drasek <john.r.van.drasek@intel.com>
2015-04-14 16:06:27 -07:00
Mihai Tudor Panu
d2bdb8836c i2clcd: updated headers with tags
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-04-13 17:24:40 -07:00
Mihai Tudor Panu
dc932b61e7 examples: updated filenames and snippets to start with chipid
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-03-13 16:50:18 -07:00
Mihai Tudor Panu
74f00c8a55 i2clcd: added uint8 typemap for python
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-03-05 12:23:11 -08:00
Clark Scheff
f50ab24bb3 jhd1313m1: Remove unused variable from Jhd1313m1:write()
Signed-off-by: Clark Scheff <clark@scheffsblend.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-03-05 11:51:44 -08:00
Clark Scheff
7bd7e80b2e i2clcd: Add createChar method
LCDs based on the HD44780 allow for setting 8 custom characters.
This patch adds a method that exposes this capability.

Signed-off-by: Clark Scheff <clark@scheffsblend.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-03-05 11:50:12 -08:00
Mihai Tudor Panu
cb353600ec jhd1313m: write function fix for lost chars
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-02-10 11:09:52 -08:00
Zion Orent
d9130671d7 ssd1327: Modifications to js swig file
Signed-off-by: Zion Orent <zorent@ics.com>
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Sarah Knepper <sarah.knepper@intel.com>
2015-01-15 18:38:53 -08:00
Brendan Le Foll
fc776ba3a3 jhd1313m1.h: add warning to show it only works with 5V
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-05 13:54:31 +00:00
Brendan Le Foll
397af51d7c upm: Add sensor groups based on IO types
This commit also fixes adds some default constructor arguments to some i2c
sensors.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-02 10:28:29 +01:00
Brendan Le Foll
67d2cb6428 jhd1313m1: add default i2c addresses
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-22 17:26:27 +01:00
Brendan Le Foll
a07663045b i2clcd: add ssd1308 to swig and move common files to ssd.h
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-22 17:07:00 +01:00
Brendan Le Foll
befba8c18d doxygen: add groups for all modules
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-22 16:37:36 +01:00
Brendan Le Foll
e3177c260c doc: improve & complete documentation on many sensors
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-01 15:31:55 +01:00
Brendan Le Foll
9c9b273b5a lcd: overhaul documentation for lcd module
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-08-07 19:15:49 +01:00
Kirill Luchikhin
d15bf22536 Fix some dosctrings errors and trailing whitespaces
Signed-off-by: Kirill Luchikhin <kirill.luchikhin@intel.com>
2014-07-29 21:46:48 +04:00
Brendan Le Foll
731704eaac Jhd1313m1: add basic scroll functionality
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-07-14 15:25:12 +01:00