From bcdaccf68dbd087febbc0d07bf98ece2b37d5d8d Mon Sep 17 00:00:00 2001 From: Wouter van Verre Date: Thu, 9 Apr 2015 17:41:54 +0100 Subject: [PATCH] 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 Signed-off-by: Mihai Tudor Panu --- src/lcd/jhd1313m1.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lcd/jhd1313m1.cxx b/src/lcd/jhd1313m1.cxx index c8b41283..03afa4cb 100644 --- a/src/lcd/jhd1313m1.cxx +++ b/src/lcd/jhd1313m1.cxx @@ -45,14 +45,15 @@ Jhd1313m1::Jhd1313m1(int bus, int lcdAddress, int rgbAddress) : I2CLcd(bus, lcdA ret = i2Cmd(m_i2c_lcd_control, LCD_FUNCTIONSET | LCD_2LINE); UPM_CHECK_MRAA_SUCCESS(ret, "Unable to initialise the LCD controller"); - usleep(4500); + usleep(100); ret = i2Cmd(m_i2c_lcd_control, LCD_DISPLAYCONTROL | LCD_DISPLAYON); UPM_CHECK_MRAA_SUCCESS(ret, "Unable to initialise the LCD controller"); + usleep(100); ret = clear(); UPM_CHECK_MRAA_SUCCESS(ret, "Unable to initialise the LCD controller"); - usleep(4500); + usleep(2000); ret = i2Cmd(m_i2c_lcd_control, LCD_ENTRYMODESET | LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT); UPM_CHECK_MRAA_SUCCESS(ret, "Unable to initialise the LCD controller");