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.
Dependencies: SX1276Lib AdaFruit_RGBLCD MCP23017 mbed
Fork of AdaFruit_RGBLCD by
LCD2004/lcd2004.h@25:24654d08a99a, 2014-10-09 (annotated)
- Committer:
- vtraveller
- Date:
- Thu Oct 09 08:03:20 2014 +0000
- Revision:
- 25:24654d08a99a
Updated with new LCD and Key abstraction (to support different LCDs and Keyboard input).
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| vtraveller | 25:24654d08a99a | 1 | #ifndef __LCD2004_H__ |
| vtraveller | 25:24654d08a99a | 2 | #define __LCD2004_H__ |
| vtraveller | 25:24654d08a99a | 3 | |
| vtraveller | 25:24654d08a99a | 4 | #include "lcd.h" |
| vtraveller | 25:24654d08a99a | 5 | |
| vtraveller | 25:24654d08a99a | 6 | class LCD2004 |
| vtraveller | 25:24654d08a99a | 7 | : public LCD |
| vtraveller | 25:24654d08a99a | 8 | { |
| vtraveller | 25:24654d08a99a | 9 | public: |
| vtraveller | 25:24654d08a99a | 10 | LCD2004(I2C & in_cI2C); |
| vtraveller | 25:24654d08a99a | 11 | virtual int _putc(int c); |
| vtraveller | 25:24654d08a99a | 12 | |
| vtraveller | 25:24654d08a99a | 13 | virtual uint8_t columns(); |
| vtraveller | 25:24654d08a99a | 14 | virtual void clear(); |
| vtraveller | 25:24654d08a99a | 15 | virtual void createChar(uint8_t location, uint8_t charmap[]); |
| vtraveller | 25:24654d08a99a | 16 | virtual void home(); |
| vtraveller | 25:24654d08a99a | 17 | virtual uint8_t rows(); |
| vtraveller | 25:24654d08a99a | 18 | virtual void setCursor(uint8_t in_nX, uint8_t in_nY); |
| vtraveller | 25:24654d08a99a | 19 | virtual void showBlink(bool in_bShow); |
| vtraveller | 25:24654d08a99a | 20 | virtual void showCursor(bool in_bShow); |
| vtraveller | 25:24654d08a99a | 21 | virtual void showDisplay(bool in_bShow); |
| vtraveller | 25:24654d08a99a | 22 | |
| vtraveller | 25:24654d08a99a | 23 | protected: |
| vtraveller | 25:24654d08a99a | 24 | uint8_t read_reg(void); |
| vtraveller | 25:24654d08a99a | 25 | uint8_t remap(uint8_t in_nValue); |
| vtraveller | 25:24654d08a99a | 26 | void setDisplayControl(uint8_t in_nReg, bool in_bEnable); |
| vtraveller | 25:24654d08a99a | 27 | void write_data(uint8_t in_nReg, uint8_t in_nValue); |
| vtraveller | 25:24654d08a99a | 28 | void write_reg(uint8_t in_nValue); |
| vtraveller | 25:24654d08a99a | 29 | |
| vtraveller | 25:24654d08a99a | 30 | protected: |
| vtraveller | 25:24654d08a99a | 31 | uint8_t m_nDisplayControl; |
| vtraveller | 25:24654d08a99a | 32 | }; |
| vtraveller | 25:24654d08a99a | 33 | |
| vtraveller | 25:24654d08a99a | 34 | #endif // __LCD2004_H__ |
