A class that provides an interface to an LCD character module. It provices support for multiple rows and columns and provides methods for formatting and printing text. You should use a 4 wire interface and a 74XX595 to communicate with the display module.
More...
#include <LCDCharacterDisplay.h>
A class that provides an interface to an LCD character module. It provices support for multiple rows and columns and provides methods for formatting and printing text. You should use a 4 wire interface and a 74XX595 to communicate with the display module.
exploringBB::LCDCharacterDisplay::LCDCharacterDisplay |
( |
SPIDevice * |
device, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
66 this->device = device;
68 this->height = height;
#define DISPLAY_ENTIRE
Definition: LCDCharacterDisplay.cpp:35
#define DISPLAY_CURSOR_POS
Definition: LCDCharacterDisplay.cpp:37
#define LCD_CURSOR_DISPLAY
Definition: LCDCharacterDisplay.cpp:38
#define LCD_DISPLAY_ON_OFF
Definition: LCDCharacterDisplay.cpp:34
#define LCD_ENTRY_MODE_SET
Definition: LCDCharacterDisplay.cpp:31
#define DISPLAY_CURSOR
Definition: LCDCharacterDisplay.cpp:36
#define ENTRY_MODE_LEFT
Definition: LCDCharacterDisplay.cpp:32
exploringBB::LCDCharacterDisplay::~LCDCharacterDisplay |
( |
| ) |
|
|
virtual |
335 this->device->
close();
virtual void close()
Definition: SPIDevice.cpp:245
void exploringBB::LCDCharacterDisplay::clear |
( |
| ) |
|
|
virtual |
#define LCD_LONG_DELAY
Definition: LCDCharacterDisplay.cpp:45
#define LCD_CLEAR_DISPLAY
Definition: LCDCharacterDisplay.cpp:29
void exploringBB::LCDCharacterDisplay::home |
( |
| ) |
|
|
virtual |
#define LCD_LONG_DELAY
Definition: LCDCharacterDisplay.cpp:45
#define LCD_RETURN_HOME
Definition: LCDCharacterDisplay.cpp:30
void exploringBB::LCDCharacterDisplay::print |
( |
std::string |
message | ) |
|
|
virtual |
156 for(
unsigned int i=0; i<message.length(); i++){
157 this->
write(message[i]);
virtual void write(char c)
Definition: LCDCharacterDisplay.cpp:174
void exploringBB::LCDCharacterDisplay::setAutoscroll |
( |
bool |
isAutoscroll | ) |
|
|
virtual |
- Parameters
-
307 this->writeEntryState();
311 this->writeEntryState();
#define ENTRY_MODE_S
Definition: LCDCharacterDisplay.cpp:33
void exploringBB::LCDCharacterDisplay::setCursorBlink |
( |
bool |
isBlink | ) |
|
|
virtual |
Turn the blink on or off.
- Parameters
-
isBlink | pass true to turn the blink on, false to turn it off |
262 this->writeDisplayState();
266 this->writeDisplayState();
#define DISPLAY_CURSOR_POS
Definition: LCDCharacterDisplay.cpp:37
void exploringBB::LCDCharacterDisplay::setCursorMoveLeft |
( |
bool |
cursorMoveLeft | ) |
|
|
virtual |
- Parameters
-
290 if (!cursorMoveLeft){
292 this->writeCursorState();
296 this->writeCursorState();
#define CURSOR_DISPLAY_RL
Definition: LCDCharacterDisplay.cpp:40
void exploringBB::LCDCharacterDisplay::setCursorMoveOff |
( |
bool |
cursorMoveOff | ) |
|
|
virtual |
Turn the cursor moving On or Off
- Parameters
-
277 this->writeCursorState();
281 this->writeCursorState();
#define CURSOR_DISPLAY_SC
Definition: LCDCharacterDisplay.cpp:39
void exploringBB::LCDCharacterDisplay::setCursorOff |
( |
bool |
cursorOff | ) |
|
|
virtual |
Turn the cursor on or off.
- Parameters
-
cursorOff | pass true to turn the cursor off, false to turn it back on |
247 this->writeDisplayState();
251 this->writeDisplayState();
#define DISPLAY_CURSOR
Definition: LCDCharacterDisplay.cpp:36
int exploringBB::LCDCharacterDisplay::setCursorPosition |
( |
int |
row, |
|
|
int |
column |
|
) |
| |
|
virtual |
217 if ((column>=this->width)||(row>=this->height))
return -1;
220 this->command(value);
#define LCD_ROW_OFFSET_ADDR
Definition: LCDCharacterDisplay.cpp:47
#define LCD_DDRAM_ADDR
Definition: LCDCharacterDisplay.cpp:43
void exploringBB::LCDCharacterDisplay::setDisplayOff |
( |
bool |
displayOff | ) |
|
|
virtual |
Turn the display on or off.
- Parameters
-
displayOff | pass true to turn the display off, false to turn it back on |
232 this->writeDisplayState();
236 this->writeDisplayState();
#define DISPLAY_ENTIRE
Definition: LCDCharacterDisplay.cpp:35
void exploringBB::LCDCharacterDisplay::setScrollDisplayLeft |
( |
bool |
scrollLeft | ) |
|
|
virtual |
- Parameters
-
322 this->writeEntryState();
326 this->writeEntryState();
#define ENTRY_MODE_LEFT
Definition: LCDCharacterDisplay.cpp:32
void exploringBB::LCDCharacterDisplay::write |
( |
char |
c | ) |
|
|
virtual |
176 char upper = (c << 4) & 0b11110000;
177 char lower = c & 0b11110000;
179 this->device->
write(lower | 0b00000011);
181 this->device->
write(lower | 0b00000001);
183 this->device->
write(upper | 0b00000011);
185 this->device->
write(upper | 0b00000001);
virtual int write(unsigned char value)
Definition: SPIDevice.cpp:139
The documentation for this class was generated from the following files: