Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SX1276_GPS by
Diff: LCDadafruit/lcdadafruit.cpp
- Revision:
- 32:a2472bbe7c92
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LCDadafruit/lcdadafruit.cpp Wed Jul 29 12:14:42 2015 +0000
@@ -0,0 +1,61 @@
+#include "mbed.h"
+#include "lcdadafruit.h"
+
+LCDadafruit::LCDadafruit(I2C & in_cI2C)
+ : LCD(in_cI2C)
+ , m_cMCP(in_cI2C, 0x20 << 1)
+ , m_cLCD(m_cMCP)
+{
+ m_cLCD.begin(16,2);
+}
+
+int LCDadafruit::_putc(int in_nValue)
+{
+ return m_cLCD._putc(in_nValue);
+}
+
+void LCDadafruit::clear()
+{
+ m_cLCD.clear();
+}
+
+uint8_t LCDadafruit::columns()
+{
+ return 16;
+}
+
+void LCDadafruit::createChar(uint8_t location, uint8_t charmap[])
+{
+ m_cLCD.createChar(location,charmap);
+}
+
+void LCDadafruit::home()
+{
+ m_cLCD.home();
+}
+
+uint8_t LCDadafruit::rows()
+{
+ return 2;
+}
+
+void LCDadafruit::setCursor(uint8_t in_nX, uint8_t in_nY)
+{
+ m_cLCD.setCursor(in_nX,in_nY);
+}
+
+void LCDadafruit::showBlink(bool in_bShow)
+{
+
+ if (in_bShow) m_cLCD.blink(); else m_cLCD.noBlink();
+}
+
+void LCDadafruit::showCursor(bool in_bShow)
+{
+ if (in_bShow) m_cLCD.cursor(); else m_cLCD.noCursor();
+}
+
+void LCDadafruit::showDisplay(bool in_bShow)
+{
+ if (in_bShow) m_cLCD.display(); else m_cLCD.noDisplay();
+}
