Otherwise, we generate an exception. This should fix Issue #172:
https://github.com/intel-iot-devkit/upm/issues/172
Signed-off-by: Zion Orent <zorent@ics.com>
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>