Arduino-LCD
LCD library for Arduino
LCD::Device Class Referenceabstract

#include <LCD.h>

Inheritance diagram for LCD::Device:
Inheritance graph
Collaboration diagram for LCD::Device:
Collaboration graph

Public Member Functions

 Device ()
 
virtual bool begin ()=0
 
virtual bool end ()
 
virtual void backlight_on ()
 
virtual void backlight_off ()
 
virtual void display_contrast (uint8_t level)
 
virtual void display_on ()=0
 
virtual void display_off ()=0
 
virtual void display_normal ()
 
virtual void display_inverse ()
 
virtual void display_clear ()=0
 
virtual void cursor_blink_on ()
 
virtual void cursor_blink_off ()
 
void cursor_get (uint8_t &x, uint8_t &y) const
 
virtual void cursor_set (uint8_t x, uint8_t y)=0
 
virtual void cursor_home ()
 
virtual void cursor_update ()
 
uint8_t tab_step () const
 
void tab_step (uint8_t step)
 
uint8_t text_mode () const
 
void text_normal_mode ()
 
void text_inverted_mode ()
 

Protected Attributes

uint8_t m_x
 Cursor position x. More...
 
uint8_t m_y
 Cursor position y. More...
 
uint8_t m_tab
 Tab step. More...
 
uint8_t m_mode
 Text mode. More...
 

Detailed Description

Common interface for LCD; LCD::Device as the base class for device drivers.

Definition at line 26 of file LCD.h.

Constructor & Destructor Documentation

LCD::Device::Device ( )
inline

Initiate generic LCD device driver.

Definition at line 31 of file LCD.h.

Member Function Documentation

virtual void LCD::Device::backlight_off ( )
inlinevirtual

Turn display backlight off.

Reimplemented in HD44780, and LCD4884.

Definition at line 70 of file LCD.h.

virtual void LCD::Device::backlight_on ( )
inlinevirtual

Turn display backlight on.

Reimplemented in HD44780, and LCD4884.

Definition at line 64 of file LCD.h.

virtual bool LCD::Device::begin ( )
pure virtual

Start display for text output. Returns true if successful otherwise false.

Returns
boolean.

Implemented in PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >, PCD8544< BOARD::D5, BOARD::D4, BOARD::D3, BOARD::D2 >, MAX72XX< SCE_PIN, SDIN_PIN, SCLK_PIN >, HD44780, and LCD4884.

virtual void LCD::Device::cursor_blink_off ( )
inlinevirtual

Turn cursor blink off.

Reimplemented in HD44780.

Definition at line 119 of file LCD.h.

virtual void LCD::Device::cursor_blink_on ( )
inlinevirtual

Turn cursor blink on.

Reimplemented in HD44780.

Definition at line 113 of file LCD.h.

void LCD::Device::cursor_get ( uint8_t &  x,
uint8_t &  y 
) const
inline

Get current cursor position.

Parameters
[out]x.
[out]y.

Definition at line 126 of file LCD.h.

virtual void LCD::Device::cursor_home ( )
inlinevirtual

Set cursor to home position (0, 0).

Reimplemented in HD44780.

Definition at line 145 of file LCD.h.

virtual void LCD::Device::cursor_set ( uint8_t  x,
uint8_t  y 
)
pure virtual
virtual void LCD::Device::cursor_update ( )
inlinevirtual

Call frequently to allow cursor blink.

Definition at line 154 of file LCD.h.

virtual void LCD::Device::display_clear ( )
pure virtual
virtual void LCD::Device::display_contrast ( uint8_t  level)
inlinevirtual

Set display contrast level.

Parameters
[in]levelto set.

Reimplemented in PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >, PCD8544< BOARD::D5, BOARD::D4, BOARD::D3, BOARD::D2 >, and MAX72XX< SCE_PIN, SDIN_PIN, SCLK_PIN >.

Definition at line 77 of file LCD.h.

virtual void LCD::Device::display_inverse ( )
inlinevirtual

Display inverse mode.

Reimplemented in PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >, and PCD8544< BOARD::D5, BOARD::D4, BOARD::D3, BOARD::D2 >.

Definition at line 101 of file LCD.h.

virtual void LCD::Device::display_normal ( )
inlinevirtual

Display normal mode.

Reimplemented in PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >, and PCD8544< BOARD::D5, BOARD::D4, BOARD::D3, BOARD::D2 >.

Definition at line 95 of file LCD.h.

virtual void LCD::Device::display_off ( )
pure virtual
virtual void LCD::Device::display_on ( )
pure virtual
virtual bool LCD::Device::end ( )
inlinevirtual

Stop display and power down. Returns true if successful otherwise false.

Reimplemented in PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >, PCD8544< BOARD::D5, BOARD::D4, BOARD::D3, BOARD::D2 >, and MAX72XX< SCE_PIN, SDIN_PIN, SCLK_PIN >.

Definition at line 52 of file LCD.h.

uint8_t LCD::Device::tab_step ( ) const
inline

Get tab step.

Returns
tab step.

Definition at line 160 of file LCD.h.

void LCD::Device::tab_step ( uint8_t  step)
inline

Set tab step to given value.

Parameters
[in]steptab.

Definition at line 170 of file LCD.h.

void LCD::Device::text_inverted_mode ( )
inline

Set inverted text mode.

Definition at line 197 of file LCD.h.

uint8_t LCD::Device::text_mode ( ) const
inline

Get text mode. Return 0x00 for normal mode, 0xff inverted mode.

Definition at line 179 of file LCD.h.

void LCD::Device::text_normal_mode ( )
inline

Set normal text mode.

Definition at line 188 of file LCD.h.

Member Data Documentation

uint8_t LCD::Device::m_mode
protected

Text mode.

Definition at line 207 of file LCD.h.

uint8_t LCD::Device::m_tab
protected

Tab step.

Definition at line 206 of file LCD.h.

uint8_t LCD::Device::m_x
protected

Cursor position x.

Definition at line 204 of file LCD.h.

uint8_t LCD::Device::m_y
protected

Cursor position y.

Definition at line 205 of file LCD.h.


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