MHVLib  20111011
An efficiency oriented runtime library for AVR microcontrollers
MHV_Display_Monochrome Class Reference

#include <MHV_Display_Monochrome.h>

Inheritance diagram for MHV_Display_Monochrome:
MHV_Device_TX MHV_Display_Holtek_HT1632 MHV_Display_Monochrome_Buffered MHV_PWMMatrix

List of all members.

Public Member Functions

 MHV_Display_Monochrome (uint16_t colCount, uint16_t rowCount, MHV_RingBuffer *txBuffers)
uint16_t getWidth ()
uint16_t getHeight ()
void clear (uint8_t value)
bool writeString (const MHV_FONT *font, int16_t *offsetX, int16_t offsetY, uint8_t onValue, uint8_t offValue, const char *string)
bool writeString_P (const MHV_FONT *font, int16_t *offsetX, int16_t offsetY, uint8_t onValue, uint8_t offValue, PGM_P string)
bool writeBuffer (const MHV_FONT *font, int16_t *offsetX, int16_t offsetY, uint8_t onValue, uint8_t offValue, const char *buffer, uint16_t length)
bool writeBuffer_P (const MHV_FONT *font, int16_t *offsetX, int16_t offsetY, uint8_t onValue, uint8_t offValue, PGM_P buffer, uint16_t length)
bool txAnimation (const MHV_FONT *font, int16_t offsetY, uint8_t onValue, uint8_t offValue)
virtual void setPixel (uint16_t row, uint16_t col, uint8_t value)=0
virtual uint8_t getPixel (uint16_t row, uint16_t col)=0

Protected Member Functions

bool writeChar (const MHV_FONT *font, int16_t *offsetX, int16_t offsetY, uint8_t onValue, uint8_t offValue, char character)
bool writeSeperator (const MHV_FONT *font, int16_t *offsetX, int16_t offsetY, uint8_t onValue, uint8_t offValue)
void runTxBuffers ()

Protected Attributes

uint16_t _colCount
uint16_t _rowCount
int16_t _txOffset

Detailed Description

Definition at line 36 of file MHV_Display_Monochrome.h.


Constructor & Destructor Documentation

MHV_Display_Monochrome::MHV_Display_Monochrome ( uint16_t  colCount,
uint16_t  rowCount,
MHV_RingBuffer txBuffers 
)

A monochrome bitmap display Origin (0,0) is bottom left Create a new monochrome display

Parameters:
colCountthe number of columns
rowCountthe number of rows
txBuffersbuffers to use for text writing

Definition at line 42 of file MHV_Display_Monochrome.cpp.


Member Function Documentation

void MHV_Display_Monochrome::clear ( uint8_t  value)

Clear the display to a particular value

Parameters:
valuethe value to fill the display with

Definition at line 67 of file MHV_Display_Monochrome.cpp.

uint16_t MHV_Display_Monochrome::getHeight ( )

Get the width of the display

Definition at line 59 of file MHV_Display_Monochrome.cpp.

virtual uint8_t MHV_Display_Monochrome::getPixel ( uint16_t  row,
uint16_t  col 
) [pure virtual]
uint16_t MHV_Display_Monochrome::getWidth ( )

Get the width of the display

Definition at line 52 of file MHV_Display_Monochrome.cpp.

void MHV_Display_Monochrome::runTxBuffers ( ) [protected, virtual]

Start rendering TX buffers

Implements MHV_Device_TX.

Definition at line 271 of file MHV_Display_Monochrome.cpp.

virtual void MHV_Display_Monochrome::setPixel ( uint16_t  row,
uint16_t  col,
uint8_t  value 
) [pure virtual]
bool MHV_Display_Monochrome::txAnimation ( const MHV_FONT font,
int16_t  offsetY,
uint8_t  onValue,
uint8_t  offValue 
)

Render a frame of TX buffer animation - scrolls text from right to left, before moving to the next buffer

Parameters:
fontthe font to use
offsetYthe vertical pixel offset to start writing at (bottom of char)
onValuethe pixel value for on pixels
offValuethe pixel value for off pixels
Returns:
true if there are more frames to be rendered

Definition at line 284 of file MHV_Display_Monochrome.cpp.

bool MHV_Display_Monochrome::writeBuffer ( const MHV_FONT font,
int16_t *  offsetX,
int16_t  offsetY,
uint8_t  onValue,
uint8_t  offValue,
const char *  buffer,
uint16_t  length 
)

Write a buffer to the display

Parameters:
fontthe font to use
offsetXthe horizontal pixel offset to start writing at (left side of char) will increment to the next position on return)
offsetYthe vertical pixel offset to start writing at (bottom of char)
onValuethe pixel value to use for on
offValuethe pixel value to use for off
bufferthe buffer to write
lengththe length of the buffer
Returns:
true if anything was written

Definition at line 199 of file MHV_Display_Monochrome.cpp.

bool MHV_Display_Monochrome::writeBuffer_P ( const MHV_FONT font,
int16_t *  offsetX,
int16_t  offsetY,
uint8_t  onValue,
uint8_t  offValue,
PGM_P  buffer,
uint16_t  length 
)

Write a PROGMEM buffer to the display

Parameters:
fontthe font to use
offsetXthe horizontal pixel offset to start writing at (left side of char) will increment to the next position on return)
offsetYthe vertical pixel offset to start writing at (bottom of char)
onValuethe pixel value to use for on
offValuethe pixel value to use for off
bufferthe buffer to write
lengththe length of the buffer
Returns:
true if anything was written

Definition at line 253 of file MHV_Display_Monochrome.cpp.

bool MHV_Display_Monochrome::writeChar ( const MHV_FONT font,
int16_t *  offsetX,
int16_t  offsetY,
uint8_t  onValue,
uint8_t  offValue,
char  character 
) [protected]

Write a character to the display

Parameters:
fontthe font to use
offsetXthe horizontal pixel offset to start writing at (left side of char) will increment to the next position on return)
offsetYthe vertical pixel offset to start writing at (bottom of char)
onValuethe pixel value to use for on
offValuethe pixel value to use for off
characterthe character to write
Returns:
true if a character was written

Definition at line 87 of file MHV_Display_Monochrome.cpp.

bool MHV_Display_Monochrome::writeSeperator ( const MHV_FONT font,
int16_t *  offsetX,
int16_t  offsetY,
uint8_t  onValue,
uint8_t  offValue 
) [protected]

Write a character seperator (a single column of off pixels) to the display

Parameters:
fontthe font to use
offsetXthe horizontal pixel offset to start writing at (left side of char) will increment to the next position on return)
offsetYthe vertical pixel offset to start writing at (bottom of char)
onValuethe pixel value to use for on
offValuethe pixel value to use for off
Returns:
true if the seperator was written

Definition at line 141 of file MHV_Display_Monochrome.cpp.

bool MHV_Display_Monochrome::writeString ( const MHV_FONT font,
int16_t *  offsetX,
int16_t  offsetY,
uint8_t  onValue,
uint8_t  offValue,
const char *  string 
)

Write a string to the display

Parameters:
fontthe font to use
offsetXthe horizontal pixel offset to start writing at (left side of char) will increment to the next position on return)
offsetYthe vertical pixel offset to start writing at (bottom of char)
onValuethe pixel value to use for on
offValuethe pixel value to use for off
stringthe string to write
Returns:
true if anything was written

Definition at line 173 of file MHV_Display_Monochrome.cpp.

bool MHV_Display_Monochrome::writeString_P ( const MHV_FONT font,
int16_t *  offsetX,
int16_t  offsetY,
uint8_t  onValue,
uint8_t  offValue,
PGM_P  string 
)

Write a PROGMEM string to the display

Parameters:
fontthe font to use
offsetXthe horizontal pixel offset to start writing at (left side of char) will increment to the next position on return)
offsetYthe vertical pixel offset to start writing at (bottom of char)
onValuethe pixel value to use for on
offValuethe pixel value to use for off
stringthe string to write
Returns:
true if anything was written

Definition at line 224 of file MHV_Display_Monochrome.cpp.


Member Data Documentation

uint16_t MHV_Display_Monochrome::_colCount [protected]

Definition at line 38 of file MHV_Display_Monochrome.h.

uint16_t MHV_Display_Monochrome::_rowCount [protected]

Definition at line 39 of file MHV_Display_Monochrome.h.

int16_t MHV_Display_Monochrome::_txOffset [protected]

Definition at line 40 of file MHV_Display_Monochrome.h.


The documentation for this class was generated from the following files: