Simplify the OLED initialisation.

This commit is contained in:
Jonathan Naylor
2021-04-11 20:43:28 +01:00
parent a3e0ad82e2
commit 4f3e6935d2
4 changed files with 5 additions and 11 deletions
+2 -6
View File
@@ -313,11 +313,9 @@ m_oledBuffer(NULL)
clear();
}
bool CI2COLED::init()
void CI2COLED::init()
{
bool ret = m_i2c.init();
if (!ret)
return false;
m_i2c.init();
// Initialise the VG-6432TSWEG02 OLED display
sendCommand(0xAEU); /*display off*/
@@ -352,8 +350,6 @@ bool CI2COLED::init()
sendCommand(0x8DU, 0x10U); /*set charge pump enable*/
sendCommand(0xAFU); /*display ON*/
return true;
}
void CI2COLED::setMode(int state)