jhd1313m1: added backlight control functions

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Mihai Tudor Panu
2016-08-30 15:16:07 -07:00
parent 8d524b8744
commit 5304192813
2 changed files with 27 additions and 13 deletions

View File

@ -76,6 +76,7 @@ class Jhd1313m1 : public Lcm1602
mraa::Result scroll(bool direction);
/**
* Sets the color of the backlight
* Can be used to change the color even when the backlight is off
*
* @param r 0-255 value for red
* @param g 0-255 value for green
@ -83,6 +84,18 @@ class Jhd1313m1 : public Lcm1602
* @return Result of the operation
*/
mraa::Result setColor(uint8_t r, uint8_t g, uint8_t b);
/**
* Turns backlight on
*
* @return Result of operation
*/
mraa::Result backlightOn();
/**
* Turns backlight off, background color is saved
*
* @return Result of operation
*/
mraa::Result backlightOff();
protected:
virtual mraa::Result command(uint8_t cmd);