include/lc7981.c File Reference

#include "lc7981.h"

Functions

void lcd_init (uint8_t mode)
 lcd_init set the to default values.
void lcd_write_command (uint8_t cmd, uint8_t data)
 Writes a command and a data byte to the lcd.
uint8_t lcd_read_byte ()
 Reads a byte from the display memory.
void lcd_strobe ()
 Generates the strobe signal for writing data.
void lcd_clear ()
 Clears the display by setting the whole memory to 0.
void lcd_write_text (char *txt)
void lcd_gotoxy (uint8_t x, uint8_t y)
 Set the display cursor to a specific location.
void lcd_plot_pixel (uint8_t x, uint8_t y, uint8_t set)
 set or unset a pixel at the specified location
void lcd_plot_bitmap (uint8_t x_off, uint8_t y_off, const uint8_t *bitmap, uint8_t w, uint8_t h)
 This function will plot a bitmap with the upper left corner to the given coordinates.

Variables

uint8_t lcd_mode
 Currently used mode, can be text or graphic.
uint8_t lcd_curline
 Current line. Used for scrolling in text mode.

Function Documentation

void lcd_clear (  )  [inline]

Clears the display by setting the whole memory to 0.

void lcd_gotoxy ( uint8_t  x,
uint8_t  y 
) [inline]

Set the display cursor to a specific location.

Right now this does only work in text mode, since there's no need for it now in graphics mode.
If the x and y values are to big, the function does nothing.

Parameters:
x the horizontal cursorposition (starts at 0)
y the vertical cursorposition (starts at 0)

void lcd_init ( uint8_t  mode  ) 

lcd_init set the to default values.

Parameters:
mode LCD_TEXT for text mode and LCD_GRAPHIC for graphic mode

void lcd_plot_bitmap ( uint8_t  x_off,
uint8_t  y_off,
const uint8_t *  bitmap,
uint8_t  w,
uint8_t  h 
)

This function will plot a bitmap with the upper left corner to the given coordinates.


If the bitmap doesn't fit on the display at this location, nothing is drawn at all.
Unset pixels are treated as transparent
This function is by far the most tricky piece of code in this project,
don't worry if you don't understand it at first sight.
And if you know a better way to do this, tell me.

Parameters:
x horizontal position of the bitmap
y vertical position of the bitmap
bitmap pointer to the bitmap in pgmspace
w width of the bitmap
h height of the bitmap
This function is dedicated to Greta, one of the most important persons in my life so far.
Even though I can't remember her actual name.

void lcd_plot_pixel ( uint8_t  x,
uint8_t  y,
uint8_t  set 
)

set or unset a pixel at the specified location

Parameters:
x horizontal position of the pixel (starts at 0)
y horizontal position of the pixel (starts at 0)
set can be PIXEL_ON or PIXEL_OFF

uint8_t lcd_read_byte (  )  [inline]

Reads a byte from the display memory.

lcd_gotoxy can be used to set the location. Important : lcd_gotoxy doesn't work in graphics mode yet.

Returns:
the byte which has been read
See also:
lcd_gotoxy

void lcd_strobe (  )  [inline]

Generates the strobe signal for writing data.

This function is meant for internal usage only.

void lcd_write_command ( uint8_t  cmd,
uint8_t  data 
) [inline]

Writes a command and a data byte to the lcd.

Parameters:
cmd the command byte
data the data that is going to be written after the command

void lcd_write_text ( char *  txt  ) 


Variable Documentation

uint8_t lcd_curline

Current line. Used for scrolling in text mode.

uint8_t lcd_mode

Currently used mode, can be text or graphic.


Generated on Sun May 17 18:34:49 2009 for glcd by  doxygen 1.5.5