MHVLib
20111011
An efficiency oriented runtime library for AVR microcontrollers
|
#include <MHV_Display_Character.h>
Public Member Functions | |
MHV_Display_Character (uint16_t cols, uint16_t rows, MHV_RingBuffer *txBuffer) | |
void | writeChar (char character) |
void | scrollVertically () |
void | setCursor (uint16_t col, uint16_t row) |
void | runTxBuffers () |
bool | txAnimation (uint16_t row) |
uint8_t | getWidth () |
uint8_t | getHeight () |
bool | writeString (int16_t *offsetX, uint16_t offsetY, const char *string) |
bool | writeBuffer (int16_t *offsetX, uint16_t offsetY, const char *buffer, uint16_t length) |
bool | writeString_P (int16_t *offsetX, uint16_t offsetY, PGM_P string) |
bool | writeBuffer_P (int16_t *offsetX, uint16_t offsetY, PGM_P buffer, uint16_t length) |
void | setWrap (bool shouldWrap) |
void | setScroll (bool shouldScroll) |
virtual void | _writeChar (char character)=0 |
virtual char | _readChar ()=0 |
virtual void | _setCursor (uint16_t col, uint16_t row)=0 |
virtual void | clear ()=0 |
Protected Attributes | |
uint16_t | _rowCount |
uint16_t | _colCount |
int16_t | _txOffset |
uint16_t | _currentRow |
uint16_t | _currentCol |
bool | _wrap |
bool | _scroll |
Definition at line 32 of file MHV_Display_Character.h.
MHV_Display_Character::MHV_Display_Character | ( | uint16_t | colCount, |
uint16_t | rowCount, | ||
MHV_RingBuffer * | txBuffers | ||
) |
A Character charcter display Origin (0,0) is bottom left Create a new character display
colCount | the number of columns |
rowCount | the number of rows |
txBuffers | buffers to use for text writing |
Definition at line 40 of file MHV_Display_Character.cpp.
virtual char MHV_Display_Character::_readChar | ( | ) | [pure virtual] |
Implemented in MHV_Display_HD44780.
virtual void MHV_Display_Character::_setCursor | ( | uint16_t | col, |
uint16_t | row | ||
) | [pure virtual] |
Implemented in MHV_Display_HD44780.
virtual void MHV_Display_Character::_writeChar | ( | char | character | ) | [pure virtual] |
Implemented in MHV_Display_HD44780.
virtual void MHV_Display_Character::clear | ( | ) | [pure virtual] |
Implemented in MHV_Display_HD44780.
uint8_t MHV_Display_Character::getHeight | ( | ) |
Get the width of the display
Definition at line 61 of file MHV_Display_Character.cpp.
uint8_t MHV_Display_Character::getWidth | ( | ) |
Get the width of the display
Definition at line 54 of file MHV_Display_Character.cpp.
void MHV_Display_Character::runTxBuffers | ( | ) | [virtual] |
Start rendering TX buffers
Implements MHV_Device_TX.
Definition at line 186 of file MHV_Display_Character.cpp.
void MHV_Display_Character::scrollVertically | ( | ) |
Scroll the display up, leaving a blank line at the bottom
Definition at line 325 of file MHV_Display_Character.cpp.
void MHV_Display_Character::setCursor | ( | uint16_t | col, |
uint16_t | row | ||
) |
Position the cursor
col | the column to set |
row | the row to set |
Definition at line 253 of file MHV_Display_Character.cpp.
void MHV_Display_Character::setScroll | ( | bool | shouldScroll | ) |
Should the automatically scroll characters vertically?
shouldScroll | true to scroll |
Definition at line 244 of file MHV_Display_Character.cpp.
void MHV_Display_Character::setWrap | ( | bool | shouldWrap | ) |
Should the display automatically wrap characters?
shouldWrap | true to wrap |
Definition at line 236 of file MHV_Display_Character.cpp.
bool MHV_Display_Character::txAnimation | ( | uint16_t | row | ) |
Render a frame of TX buffer animation - scrolls text from right to left, before moving to the next buffer
row | the vertical pixel offset to start writing at |
Definition at line 196 of file MHV_Display_Character.cpp.
bool MHV_Display_Character::writeBuffer | ( | int16_t * | offsetX, |
uint16_t | offsetY, | ||
const char * | buffer, | ||
uint16_t | length | ||
) |
Write a buffer to the display
offsetX | the horizontal offset to start writing at |
offsetY | the vertical offset to start writing at |
buffer | the buffer to write |
length | the length of the buffer |
Definition at line 104 of file MHV_Display_Character.cpp.
bool MHV_Display_Character::writeBuffer_P | ( | int16_t * | offsetX, |
uint16_t | offsetY, | ||
PGM_P | buffer, | ||
uint16_t | length | ||
) |
Write a PROGMEM buffer to the display
offsetX | the horizontal offset to start writing at |
offsetY | the vertical offset to start writing at |
buffer | the buffer to write |
length | the length of the buffer |
Definition at line 164 of file MHV_Display_Character.cpp.
void MHV_Display_Character::writeChar | ( | char | character | ) |
Write a character to the display Will interpret the following special characters: \b Backspace \t Tab \n Newline
character | the character to write |
Definition at line 268 of file MHV_Display_Character.cpp.
bool MHV_Display_Character::writeString | ( | int16_t * | offsetX, |
uint16_t | offsetY, | ||
const char * | string | ||
) |
Write a string to the display
offsetX | the horizontal offset to start writing at |
offsetY | the vertical offset to start writing at |
string | the string to write |
Definition at line 72 of file MHV_Display_Character.cpp.
bool MHV_Display_Character::writeString_P | ( | int16_t * | offsetX, |
uint16_t | offsetY, | ||
PGM_P | string | ||
) |
Write a PROGMEM string to the display
offsetX | the horizontal offset to start writing at |
offsetY | the vertical offset to start writing at |
string | the string to write |
Definition at line 132 of file MHV_Display_Character.cpp.
uint16_t MHV_Display_Character::_colCount [protected] |
Definition at line 35 of file MHV_Display_Character.h.
uint16_t MHV_Display_Character::_currentCol [protected] |
Definition at line 38 of file MHV_Display_Character.h.
uint16_t MHV_Display_Character::_currentRow [protected] |
Definition at line 37 of file MHV_Display_Character.h.
uint16_t MHV_Display_Character::_rowCount [protected] |
Definition at line 34 of file MHV_Display_Character.h.
bool MHV_Display_Character::_scroll [protected] |
Definition at line 40 of file MHV_Display_Character.h.
int16_t MHV_Display_Character::_txOffset [protected] |
Definition at line 36 of file MHV_Display_Character.h.
bool MHV_Display_Character::_wrap [protected] |
Definition at line 39 of file MHV_Display_Character.h.