mirror of
https://github.com/eclipse/upm.git
synced 2025-06-12 16:20:24 +03:00

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>