mirror of
https://github.com/eclipse/upm.git
synced 2025-07-03 10:21:19 +03:00
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>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
1647f572ff
commit
8462e8ce52
@ -125,6 +125,21 @@ Jhd1313m1::scroll(bool direction)
|
||||
}
|
||||
}
|
||||
|
||||
mraa_result_t
|
||||
Jhd1313m1::createChar(uint8_t charSlot, uint8_t charData[])
|
||||
{
|
||||
mraa_result_t error = MRAA_SUCCESS;
|
||||
charSlot &= 0x07; // only have 8 positions we can set
|
||||
error = m_i2c_lcd_control.writeReg(LCD_CMD, LCD_SETCGRAMADDR | (charSlot << 3));
|
||||
if (error == MRAA_SUCCESS) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
error = m_i2c_lcd_control.writeReg(LCD_DATA, charData[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
* **************
|
||||
* virtual area
|
||||
|
Reference in New Issue
Block a user