Arduino-LCD
LCD library for Arduino
LCD4884 Class Reference

#include <LCD4884.h>

Inheritance diagram for LCD4884:
Inheritance graph
Collaboration diagram for LCD4884:
Collaboration graph

Public Types

enum  {
  NO_KEY = 0, UP_KEY, RIGHT_KEY, DOWN_KEY,
  SELECT_KEY, LEFT_KEY
}
 

Public Member Functions

 LCD4884 (const uint8_t *font=NULL)
 
virtual bool begin ()
 
virtual void backlight_on ()
 
virtual void backlight_off ()
 
virtual bool end ()
 
virtual void display_contrast (uint8_t level)
 
virtual void display_on ()
 
virtual void display_off ()
 
virtual void display_normal ()
 
virtual void display_inverse ()
 
virtual void display_clear ()
 
virtual void cursor_set (uint8_t x, uint8_t y)
 
virtual size_t write (uint8_t c)
 
virtual void cursor_blink_on ()
 
virtual void cursor_blink_off ()
 
void cursor_get (uint8_t &x, uint8_t &y) const
 
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 ()
 

Static Public Attributes

static const uint8_t FONT_WIDTH
 
static const uint8_t FONT_HEIGHT
 
static const uint8_t WIDTH
 
static const uint8_t HEIGHT
 

Protected Types

enum  
 

Protected Member Functions

const uint16_t * keymap ()
 
void write_data (uint8_t value)
 
void write_data (uint8_t value, size_t count)
 
void write_command (uint8_t value)
 
void write_command_P (const uint8_t *buf, size_t count)
 

Protected Attributes

GPIO< BOARD::D6 > m_rst
 
GPIO< BOARD::D7 > m_bl
 
GPIO< SCE_PIN > m_sce
 
GPIO< DC_PIN > m_dc
 
SRPO< MSBFIRST, SDIN_PIN, SCLK_PIN > m_srpo
 
const uint8_t * m_font
 
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...
 

Static Protected Attributes

static const uint8_t BACKGROUND
 

Detailed Description

Device drivers for LCD4884 Shield with PCD8544 display and analog joy stick (SELECT, UP, DOWN, LEFT, and RIGHT).

Definition at line 31 of file LCD4884.h.

Member Enumeration Documentation

anonymous enum
protectedinherited

Instruction set (table 1, pp. 14).

Definition at line 355 of file PCD8544.h.

anonymous enum
Enumerator
NO_KEY 
UP_KEY 
RIGHT_KEY 
DOWN_KEY 
SELECT_KEY 
LEFT_KEY 

Definition at line 36 of file LCD4884.h.

Constructor & Destructor Documentation

LCD4884::LCD4884 ( const uint8_t *  font = NULL)
inline

Construct shield device driver, and initiate pins and mapping table for keypad. The font parameter should a 5x7 font in program memory or NULL for the PCD8544 default font.

Parameters
[in]fontin program memory (Default NULL).

Definition at line 51 of file LCD4884.h.

Member Function Documentation

virtual void LCD4884::backlight_off ( )
inlinevirtual

Turn display backlight off.

Reimplemented from LCD::Device.

Definition at line 83 of file LCD4884.h.

virtual void LCD4884::backlight_on ( )
inlinevirtual

Turn display backlight on.

Reimplemented from LCD::Device.

Definition at line 74 of file LCD4884.h.

virtual bool LCD4884::begin ( )
inlinevirtual

Start interaction with shield.

Returns
true(1) if successful otherwise false(0)

Reimplemented from PCD8544< BOARD::D5, BOARD::D4, BOARD::D3, BOARD::D2 >.

Definition at line 64 of file LCD4884.h.

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

Turn cursor blink off.

Reimplemented in HD44780.

Definition at line 119 of file LCD.h.

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

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
inlineinherited

Get current cursor position.

Parameters
[out]x.
[out]y.

Definition at line 126 of file LCD.h.

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

Set cursor to home position (0, 0).

Reimplemented in HD44780.

Definition at line 145 of file LCD.h.

virtual void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::cursor_set ( uint8_t  x,
uint8_t  y 
)
inlinevirtualinherited

Set cursor to given position.

Parameters
[in]xpixel position (0..WIDTH-1).
[in]yline position (0..LINES-1).

Implements LCD::Device.

Definition at line 286 of file PCD8544.h.

virtual void LCD::Device::cursor_update ( )
inlinevirtualinherited

Call frequently to allow cursor blink.

Definition at line 154 of file LCD.h.

virtual void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::display_clear ( )
inlinevirtualinherited

Clear display and move cursor to home.

Implements LCD::Device.

Definition at line 273 of file PCD8544.h.

virtual void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::display_contrast ( uint8_t  level)
inlinevirtualinherited

Set display contrast (0..127).

Parameters
[in]contrastlevel.

Reimplemented from LCD::Device.

Definition at line 226 of file PCD8544.h.

virtual void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::display_inverse ( )
inlinevirtualinherited

Display inverse mode.

Reimplemented from LCD::Device.

Definition at line 264 of file PCD8544.h.

virtual void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::display_normal ( )
inlinevirtualinherited

Display normal mode.

Reimplemented from LCD::Device.

Definition at line 255 of file PCD8544.h.

virtual void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::display_off ( )
inlinevirtualinherited

Turn display off.

Implements LCD::Device.

Definition at line 246 of file PCD8544.h.

virtual void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::display_on ( )
inlinevirtualinherited

Turn display on.

Implements LCD::Device.

Definition at line 237 of file PCD8544.h.

virtual bool PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::end ( )
inlinevirtualinherited

Stop interaction with device and power down.

Returns
true(1) if successful otherwise false(0)

Reimplemented from LCD::Device.

Definition at line 213 of file PCD8544.h.

const uint16_t* LCD4884::keymap ( )
inlineprotected

Return key map, program memory vector in descent order.

Returns
key map.

Definition at line 99 of file LCD4884.h.

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

Get tab step.

Returns
tab step.

Definition at line 160 of file LCD.h.

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

Set tab step to given value.

Parameters
[in]steptab.

Definition at line 170 of file LCD.h.

void LCD::Device::text_inverted_mode ( )
inlineinherited

Set inverted text mode.

Definition at line 197 of file LCD.h.

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

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 ( )
inlineinherited

Set normal text mode.

Definition at line 188 of file LCD.h.

virtual size_t PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::write ( uint8_t  c)
inlinevirtualinherited

Write character to display. Handles carriage-return, line-feed, backspace, alert, horizontal tab and form-feed. Returns number of characters(1) or zero(0) on error.

Parameters
[in]ccharacter to write.
Returns
number of characters written(1) or zero(0) for error.

Definition at line 304 of file PCD8544.h.

void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::write_command ( uint8_t  value)
inlineprotectedinherited

Definition at line 410 of file PCD8544.h.

void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::write_command_P ( const uint8_t *  buf,
size_t  count 
)
inlineprotectedinherited

Definition at line 419 of file PCD8544.h.

void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::write_data ( uint8_t  value)
inlineprotectedinherited

Definition at line 395 of file PCD8544.h.

void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::write_data ( uint8_t  value,
size_t  count 
)
inlineprotectedinherited

Definition at line 402 of file PCD8544.h.

Member Data Documentation

const uint8_t PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::BACKGROUND
staticprotectedinherited

Background pattern.

Definition at line 381 of file PCD8544.h.

const uint8_t PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::FONT_HEIGHT
staticinherited

Definition at line 66 of file PCD8544.h.

const uint8_t PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::FONT_WIDTH
staticinherited

Display size.

Definition at line 65 of file PCD8544.h.

const uint8_t PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::HEIGHT
staticinherited

Definition at line 68 of file PCD8544.h.

GPIO<BOARD::D7> LCD4884::m_bl
protected

Backlight pin.

Definition at line 93 of file LCD4884.h.

GPIO<DC_PIN> PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::m_dc
protectedinherited

Data/control select pin.

Definition at line 387 of file PCD8544.h.

const uint8_t* PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::m_font
protectedinherited

Font (5x7), program memory pointer.

Definition at line 393 of file PCD8544.h.

uint8_t LCD::Device::m_mode
protectedinherited

Text mode.

Definition at line 207 of file LCD.h.

GPIO<BOARD::D6> LCD4884::m_rst
protected

Reset pin.

Definition at line 90 of file LCD4884.h.

GPIO<SCE_PIN> PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::m_sce
protectedinherited

Screen chip enable pin.

Definition at line 384 of file PCD8544.h.

SRPO<MSBFIRST, SDIN_PIN, SCLK_PIN> PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::m_srpo
protectedinherited

Screen data input and clock pins; Serial Ouput.

Definition at line 390 of file PCD8544.h.

uint8_t LCD::Device::m_tab
protectedinherited

Tab step.

Definition at line 206 of file LCD.h.

uint8_t LCD::Device::m_x
protectedinherited

Cursor position x.

Definition at line 204 of file LCD.h.

uint8_t LCD::Device::m_y
protectedinherited

Cursor position y.

Definition at line 205 of file LCD.h.

const uint8_t PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::WIDTH
staticinherited

Definition at line 67 of file PCD8544.h.


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