mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2025-12-06 05:32:00 +01:00
Fix typo and remove unwanted code
This commit is contained in:
parent
c1d97ad8cc
commit
c4a42d1279
21
HD44780.cpp
21
HD44780.cpp
|
|
@ -306,20 +306,6 @@ void CHD44780::pcf8574LCDSetup()
|
||||||
// Initalize PFC8574
|
// Initalize PFC8574
|
||||||
::pcf8574Setup(AF_BASE, PCF8574);
|
::pcf8574Setup(AF_BASE, PCF8574);
|
||||||
|
|
||||||
// Initialise LCD
|
|
||||||
m_fd = ::lcdInit(m_rows, m_cols, 4, AF_RS, AF_E, AF_D1, AF_D2, AF_D3, AF_D4, 0, 0, 0, 0);
|
|
||||||
if (m_fd == -1) {
|
|
||||||
LogError("Unable to open the HD44780 via I2C");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_rb = AF_RS;
|
|
||||||
m_strb = AF_E;
|
|
||||||
m_d0 = AF_D1;
|
|
||||||
m_d1 = AF_D2;
|
|
||||||
m_d2 = AF_D3;
|
|
||||||
m_d3 = AF_D4;
|
|
||||||
|
|
||||||
// Turn on backlight
|
// Turn on backlight
|
||||||
::pinMode (AF_BL, OUTPUT);
|
::pinMode (AF_BL, OUTPUT);
|
||||||
::digitalWrite (AF_BL, 1);
|
::digitalWrite (AF_BL, 1);
|
||||||
|
|
@ -327,6 +313,13 @@ void CHD44780::pcf8574LCDSetup()
|
||||||
// Set LCD to write mode.
|
// Set LCD to write mode.
|
||||||
::pinMode (AF_RW, OUTPUT);
|
::pinMode (AF_RW, OUTPUT);
|
||||||
::digitalWrite (AF_RW, 0);
|
::digitalWrite (AF_RW, 0);
|
||||||
|
|
||||||
|
m_rb = AF_RS;
|
||||||
|
m_strb = AF_E;
|
||||||
|
m_d0 = AF_D1;
|
||||||
|
m_d1 = AF_D2;
|
||||||
|
m_d2 = AF_D3;
|
||||||
|
m_d3 = AF_D4;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ enum ADAFRUIT_COLOUR {
|
||||||
#define AF_D2 (AF_BASE + 5)
|
#define AF_D2 (AF_BASE + 5)
|
||||||
#define AF_D3 (AF_BASE + 6)
|
#define AF_D3 (AF_BASE + 6)
|
||||||
#define AF_D4 (AF_BASE + 7)
|
#define AF_D4 (AF_BASE + 7)
|
||||||
#define PCF8547 0x27
|
#define PCF8574 0x27
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class CHD44780 : public CDisplay
|
class CHD44780 : public CDisplay
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue