Make I2C address configurable for HD44780 LCD variations

Also add a basic README with some pointers on how to connect and configure the LCDs
This commit is contained in:
Tony Corbett G0WFV
2016-06-30 20:10:30 +01:00
parent ef0ebb4d49
commit ce367f73cb
7 changed files with 72 additions and 8 deletions

View File

@@ -875,6 +875,7 @@ void CMMDVMHost::createDisplay()
unsigned int rows = m_conf.getHD44780Rows();
unsigned int columns = m_conf.getHD44780Columns();
std::vector<unsigned int> pins = m_conf.getHD44780Pins();
std::string i2cAddress = m_conf.getHD44780i2cAddress();
bool pwm = m_conf.getHD44780PWM();
unsigned int pwmPin = m_conf.getHD44780PWMPin();
unsigned int pwmBright = m_conf.getHD44780PWMBright();
@@ -898,7 +899,7 @@ void CMMDVMHost::createDisplay()
if (displayClock)
LogInfo(" Display UTC: %s", utc ? "yes" : "no");
m_display = new CHD44780(rows, columns, m_callsign, dmrid, pins, pwm, pwmPin, pwmBright, pwmDim, displayClock, utc, m_duplex);
m_display = new CHD44780(rows, columns, m_callsign, dmrid, pins, i2cAddress, pwm, pwmPin, pwmBright, pwmDim, displayClock, utc, m_duplex);
}
#endif
#if defined(OLED)