MHVLib
20111011
An efficiency oriented runtime library for AVR microcontrollers
|
#include <MHV_Display_HD44780_Shift_Register.h>
Public Member Functions | |
MHV_Display_HD44780_Shift_Register (volatile uint8_t *dataDir, volatile uint8_t *dataOut, volatile uint8_t *dataIn, uint8_t dataPin, int8_t dataPinchangeInterrupt, volatile uint8_t *enableDir, volatile uint8_t *enableOut, volatile uint8_t *enableIn, uint8_t enablePin, int8_t enablePinchangeInterrupt, volatile uint8_t *clockDir, volatile uint8_t *clockOut, volatile uint8_t *clockIn, uint8_t clockPin, int8_t clockPinchangeInterrupt, uint8_t colCount, uint16_t rowCount, MHV_RingBuffer *txBuffers) | |
void | init (bool multiLine, bool bigFont, bool cursorOn, bool cursorBlink, bool left2right, bool scroll) |
Protected Member Functions | |
void | pushBits (uint8_t byte, bool rs) |
void | writeByte (uint8_t byte, bool rs) |
uint8_t | readByte (bool rs) |
bool | isBusy () |
void | delay (MHV_HD44780_COMMAND command) |
Protected Attributes | |
volatile uint8_t * | _dataOut |
uint8_t | _dataPin |
volatile uint8_t * | _enableOut |
uint8_t | _enablePin |
volatile uint8_t * | _clockOut |
uint8_t | _clockPin |
Definition at line 32 of file MHV_Display_HD44780_Shift_Register.h.
MHV_Display_HD44780_Shift_Register::MHV_Display_HD44780_Shift_Register | ( | volatile uint8_t * | dataDir, |
volatile uint8_t * | dataOut, | ||
volatile uint8_t * | dataIn, | ||
uint8_t | dataPin, | ||
int8_t | dataPinchangeInterrupt, | ||
volatile uint8_t * | enableDir, | ||
volatile uint8_t * | enableOut, | ||
volatile uint8_t * | enableIn, | ||
uint8_t | enablePin, | ||
int8_t | enablePinchangeInterrupt, | ||
volatile uint8_t * | clockDir, | ||
volatile uint8_t * | clockOut, | ||
volatile uint8_t * | clockIn, | ||
uint8_t | clockPin, | ||
int8_t | clockPinchangeInterrupt, | ||
uint8_t | colCount, | ||
uint16_t | rowCount, | ||
MHV_RingBuffer * | txBuffers | ||
) |
A class for operating HD44780 based LCD displays via a shift register such as a 74HC164
dataDir | A member of the MHV_PIN_* macro pin declaration for the data line of the shift register |
dataOut | A member of the MHV_PIN_* macro |
dataIn | A member of the MHV_PIN_* macro |
dataPin | A member of the MHV_PIN_* macro |
dataPinchangeInterrupt | A member of the MHV_PIN_* macro |
enableDir | A member of the MHV_PIN_* macro pin declaration for the enable line of the shift register |
enableOut | A member of the MHV_PIN_* macro |
enableIn | A member of the MHV_PIN_* macro |
enablePin | A member of the MHV_PIN_* macro |
enablePinchangeInterrupt | A member of the MHV_PIN_* macro |
clockDir | A member of the MHV_PIN_* macro pin declaration for the clock line of the shift register |
clockOut | A member of the MHV_PIN_* macro |
clockIn | A member of the MHV_PIN_* macro |
clockPin | A member of the MHV_PIN_* macro |
clockPinchangeInterrupt | A member of the MHV_PIN_* macro |
colCount | the number of columns on the display |
rowCount | the number of rows on the display |
txBuffers | buffers for async writing |
Definition at line 64 of file MHV_Display_HD44780_Shift_Register.cpp.
void MHV_Display_HD44780_Shift_Register::delay | ( | MHV_HD44780_COMMAND | command | ) | [protected, virtual] |
Post-command delays
Implements MHV_Display_HD44780.
Definition at line 144 of file MHV_Display_HD44780_Shift_Register.cpp.
void MHV_Display_HD44780_Shift_Register::init | ( | bool | multiLine, |
bool | bigFont, | ||
bool | cursorOn, | ||
bool | cursorBlink, | ||
bool | left2right, | ||
bool | scroll | ||
) |
Initialise the display
multiLine | true if there is more than 1 line |
bigFont | true to use 5x11 fonts, false for 5x8 |
cursorOn | turn the curson on |
cursorBlink | blink the cursor |
left2right | true for text reading left to right |
scroll | true to scroll text rather than moving the cursor |
Definition at line 171 of file MHV_Display_HD44780_Shift_Register.cpp.
bool MHV_Display_HD44780_Shift_Register::isBusy | ( | ) | [protected, virtual] |
Check if the display is busy
Implements MHV_Display_HD44780.
Definition at line 137 of file MHV_Display_HD44780_Shift_Register.cpp.
void MHV_Display_HD44780_Shift_Register::pushBits | ( | uint8_t | byte, |
bool | rs | ||
) | [protected] |
Write 8 data bits to the display
byte | the data to write (nibble or true byte) |
rs | true to set the RS pin |
Definition at line 92 of file MHV_Display_HD44780_Shift_Register.cpp.
uint8_t MHV_Display_HD44780_Shift_Register::readByte | ( | bool | rs | ) | [protected, virtual] |
Read a byte from the display
rs | true to set the RS pin |
Implements MHV_Display_HD44780.
Definition at line 129 of file MHV_Display_HD44780_Shift_Register.cpp.
void MHV_Display_HD44780_Shift_Register::writeByte | ( | uint8_t | byte, |
bool | rs | ||
) | [protected, virtual] |
Write a byte to the display
byte | the data to write |
rs | true to set the RS pin (aka data pin ) |
Implements MHV_Display_HD44780.
Definition at line 112 of file MHV_Display_HD44780_Shift_Register.cpp.
volatile uint8_t* MHV_Display_HD44780_Shift_Register::_clockOut [protected] |
Definition at line 40 of file MHV_Display_HD44780_Shift_Register.h.
uint8_t MHV_Display_HD44780_Shift_Register::_clockPin [protected] |
Definition at line 41 of file MHV_Display_HD44780_Shift_Register.h.
volatile uint8_t* MHV_Display_HD44780_Shift_Register::_dataOut [protected] |
Definition at line 34 of file MHV_Display_HD44780_Shift_Register.h.
uint8_t MHV_Display_HD44780_Shift_Register::_dataPin [protected] |
Definition at line 35 of file MHV_Display_HD44780_Shift_Register.h.
volatile uint8_t* MHV_Display_HD44780_Shift_Register::_enableOut [protected] |
Definition at line 37 of file MHV_Display_HD44780_Shift_Register.h.
uint8_t MHV_Display_HD44780_Shift_Register::_enablePin [protected] |
Definition at line 38 of file MHV_Display_HD44780_Shift_Register.h.