83 Commits

Author SHA1 Message Date
Sergey Kiselev
1713d44a4b lcm1602: Add support for various LCD configurations / sizes
Signed-off-by: Sergey Kiselev <sergey.kiselev@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-10-05 14:47:52 -07:00
Mihai Tudor Panu
e3dde0e390 ssd1306: remove unprintable characters from header file
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-23 11:59:03 -07:00
Andrei Vasiliu
a427d6ebe5 eboled: Solved compilation warnings
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-22 11:18:59 -07:00
Tyler Gibson
14a3924fb2 eboled: Sparkfun OLED Block Improvements
Signed-off-by: Tyler Gibson <tgibson@microsoft.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-21 16:08:44 -07:00
Jon Trulson
7323b58b61 ssd1327: throw exception(s) on fatal errors
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-17 17:10:16 -07:00
Jon Trulson
cb6427b22e ssd1308: throw exception(s) on fatal errors
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-17 17:10:05 -07:00
Jon Trulson
f29141087e lcm1602,jhd1313m1: throw exception(s) on fatal errors
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-17 17:04:03 -07:00
Mihai Tudor Panu
4e70ed4973 ssd1306: updated to C++ types and new exceptions, fixed repeated call to i2cfrequency
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-15 18:27:09 -07:00
Marc Graham
3159005aa3 ssd1306: initial implementation
Signed-off-by: Marc Graham <marc@m2ag.net>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-15 18:20:45 -07:00
Stefan Andritoiu
ef74a7b137 java: Eliminated double definition of SWIGJAVA and the need for "#undefine SWIGJAVA"
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>

Conflicts:
	src/CMakeLists.txt
2015-09-15 17:58:22 -07:00
Andrei Vasiliu
2e5fbd0d54 java: ignoring BasicFonts matrix
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-15 17:08:48 -07:00
Petre Eftime
2cab79b4c2 java: Changed size_t and unsigned int to int in array declarations. Renamed buf to buffer where necesarry. Moved most Java array typemaps to java_buffer.i. Fixed some String buffers.
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>

Conflicts:
	src/upm.i
2015-09-15 17:01:39 -07:00
Andrei Vasiliu
b8835958e2 java: now using the C++ style types from mraa defined in types.hpp
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-15 16:44:18 -07:00
Petre Eftime
2ceb6a9d8d java: fix Java arrays for lcd modules
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-04 13:51:52 -07:00
Stefan Andritoiu
3d74ea9820 java: in methods taking buffers as arguments, changed buffer type from short[] to byte[]
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-04 13:51:19 -07:00
Andrei Vasiliu
945a6d4828 java: code cleanup to enable comment parsing with external tools.
Using an external code parsing library we discovered that there are
non-printable characters in some source files which break the parser.
This commit removes these characters and rewrites a type definition
which was also breaking the parser.

Signed-off-by: Mircea Bardac <mircea.bardac@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-04 13:49:06 -07:00
Stefan Andritoiu
323905a215 java: added callback functionality
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-04 13:48:50 -07:00
Stefan Andritoiu
3e59323abb java: solved SWIGTYPE_* issues
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-09-04 13:48:41 -07:00
Mihai Tudor Panu
f8766cccdc java: added java interfaces for sparkfun sensor blocks
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-08-13 16:38:40 -07:00
Stefan Andritoiu
4bea93163d Added Java bindings for the remaining sensors
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-08-13 16:26:18 -07:00
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