I2CLCD
HD4470 LCD driver via I2C interface
 All Functions Groups Pages
Functions
FUNCTIONS

Functions

void lcd_init (void)
 Display initialization sequence. More...
 
void lcd_command (uint8_t command)
 Issue a command to the display. More...
 
bool lcd_gotolc (uint8_t line, uint8_t col)
 Go to position. More...
 
void lcd_putchar (char value)
 Put char to cursor position. More...
 
bool lcd_putcharlc (uint8_t line, uint8_t col, char value)
 Put char to position. More...
 
void lcd_print (char *string)
 Print string to cursor position. More...
 
void lcd_print_P (PGM_P string)
 Print string from Flash to cursor position. More...
 
bool lcd_printlc (uint8_t line, uint8_t col, char *string)
 Print string to position (If string is longer than LCD_COLS overwrite first chars in line) More...
 
bool lcd_printlc_P (uint8_t line, uint8_t col, PGM_P string)
 Print string from Flash to position (If string is longer than LCD_COLS overwrite first chars in line) More...
 
bool lcd_printlcc (uint8_t line, uint8_t col, char *string)
 Print string to position (If string is longer than LCD_COLS continue in next line) More...
 
bool lcd_printlcc_P (uint8_t line, uint8_t col, PGM_P string)
 Print string from flash to position (If string is longer than LCD_COLS continue in next line) More...
 
bool lcd_nextline (void)
 Go to nextline (if next line > LCD_LINES return false) More...
 
bool lcd_getlc (uint8_t *line, uint8_t *col)
 Get line and col of the cursor position. More...
 
bool lcd_busy (void)
 Check if LCD is busy. More...
 
void lcd_light (bool light)
 Turn backlight ON/OFF. More...
 
void lcd_def_char (PGM_P chardata, uint8_t number)
 Define a user character. More...
 

Detailed Description

Function Documentation

bool lcd_busy ( void  )

Check if LCD is busy.

Return values
trueif busy
falseif not busy
void lcd_command ( uint8_t  command)

Issue a command to the display.

Parameters
commanduse the defined commands above
Returns
none
void lcd_def_char ( PGM_P  chardata,
uint8_t  number 
)

Define a user character.

Parameters
chardatapointer to char data in flash
numbercode of user char (0-7)
Returns
none
bool lcd_getlc ( uint8_t *  line,
uint8_t *  col 
)

Get line and col of the cursor position.

Parameters
*linepointer to the target byte for line
*colpointer to the target byte for column
Return values
trueif successfull
falseif not successfull
bool lcd_gotolc ( uint8_t  line,
uint8_t  col 
)

Go to position.

Parameters
line1st line is 1 and last line = LCD_LINES
col1st col is 1 and last col = LCD_colS
Return values
trueif successfull
falseif not successfull
void lcd_init ( void  )

Display initialization sequence.

Returns
none
void lcd_light ( bool  light)

Turn backlight ON/OFF.

Parameters
lighttrue to tun light ON
lightfalse to turn light OFF
Returns
none
bool lcd_nextline ( void  )

Go to nextline (if next line > LCD_LINES return false)

Return values
trueif successfull
falseif not successfull
void lcd_print ( char *  string)

Print string to cursor position.

Parameters
*stringpointer to the string to print
Returns
none
void lcd_print_P ( PGM_P  string)

Print string from Flash to cursor position.

Parameters
*stringpointer to the string to print
Returns
none
bool lcd_printlc ( uint8_t  line,
uint8_t  col,
char *  string 
)

Print string to position (If string is longer than LCD_COLS overwrite first chars in line)

Parameters
linethe line to put the string to
colthe column to put the string to
*stringpointer to the string to print
Return values
trueif successfull
falseif not successfull
bool lcd_printlc_P ( uint8_t  line,
uint8_t  col,
PGM_P  string 
)

Print string from Flash to position (If string is longer than LCD_COLS overwrite first chars in line)

Parameters
linethe line to put the string to
colthe column to put the string to
*stringpointer to the string to print
Return values
trueif successfull
falseif not successfull
bool lcd_printlcc ( uint8_t  line,
uint8_t  col,
char *  string 
)

Print string to position (If string is longer than LCD_COLS continue in next line)

Parameters
linethe line to put the string to
colthe col to put the string to
*stringpointer to the string to print
Return values
trueif successfull
falseif not successfull
bool lcd_printlcc_P ( uint8_t  line,
uint8_t  col,
PGM_P  string 
)

Print string from flash to position (If string is longer than LCD_COLS continue in next line)

Parameters
linethe line to put the string to
colthe col to put the string to
*stringpointer to the string to print
Return values
trueif successfull
falseif not successfull
void lcd_putchar ( char  value)

Put char to cursor position.

Parameters
valuethe char to print
Returns
none
bool lcd_putcharlc ( uint8_t  line,
uint8_t  col,
char  value 
)

Put char to position.

Parameters
linethe line to put the char to
colthe column to put the char to
valuethe char to print
Return values
trueif successfull
falseif not successfull