2009-05-16 14:10:42 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
< html > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" >
< title > glcd: include/lc7981.c File Reference< / title >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" >
< / head > < body >
<!-- Generated by Doxygen 1.5.5 -->
< div class = "navigation" id = "top" >
< div class = "tabs" >
< ul >
< li > < a href = "index.html" > < span > Main Page< / span > < / a > < / li >
< li class = "current" > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< / ul >
< / div >
< / div >
< div class = "contents" >
< h1 > include/lc7981.c File Reference< / h1 > < code > #include " < a class = "el" href = "lc7981_8h-source.html" > lc7981.h< / a > " < / code > < br >
< table border = "0" cellpadding = "0" cellspacing = "0" >
< tr > < td > < / td > < / tr >
< tr > < td colspan = "2" > < br > < h2 > Functions< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#9b18aca098d68e55bd7dd4b83f4f36e9" > lcd_init< / a > (uint8_t mode)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > lcd_init set the to default values. < a href = "#9b18aca098d68e55bd7dd4b83f4f36e9" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#b69146a9179fc5b5deef3fc61cf0208c" > lcd_write_command< / a > (uint8_t cmd, uint8_t data)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Writes a command and a data byte to the lcd. < a href = "#b69146a9179fc5b5deef3fc61cf0208c" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > uint8_t < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#6334333537ad1d0bd51cba1e80f32e74" > lcd_read_byte< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Reads a byte from the display memory. < a href = "#6334333537ad1d0bd51cba1e80f32e74" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#b4f286d6a313df7a5f692e0b4a9509ad" > lcd_strobe< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Generates the strobe signal for writing data. < a href = "#b4f286d6a313df7a5f692e0b4a9509ad" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#35c08b1fa742e650f4873939707b893b" > lcd_clear< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Clears the display by setting the whole memory to 0. < a href = "#35c08b1fa742e650f4873939707b893b" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#30251238a49999658455fdb0233757fb" > lcd_write_text< / a > (char *txt)< / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#dbf47a5efdf02367ded1ebf8f9edb5fe" > lcd_gotoxy< / a > (uint8_t x, uint8_t y)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Set the display cursor to a specific location. < a href = "#dbf47a5efdf02367ded1ebf8f9edb5fe" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#735111507ed83172f58d5af2953e31c6" > lcd_plot_pixel< / a > (uint8_t x, uint8_t y, uint8_t set)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > set or unset a pixel at the specified location < a href = "#735111507ed83172f58d5af2953e31c6" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#f3b584ee8235c6ed4ebefc50f8a95915" > lcd_plot_bitmap< / a > (uint8_t x_off, uint8_t y_off, const uint8_t *bitmap, uint8_t w, uint8_t h)< / td > < / tr >
2009-05-16 16:44:24 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > This function will plot a bitmap with the upper left corner to the given coordinates. < a href = "#f3b584ee8235c6ed4ebefc50f8a95915" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td colspan = "2" > < br > < h2 > Variables< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > uint8_t < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#a29c0577fe01129f48b5b21301d3ea49" > lcd_mode< / a > < / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Currently used mode, can be text or graphic. < a href = "#a29c0577fe01129f48b5b21301d3ea49" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > uint8_t < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8c.html#76f8e26cf50274635b544f68752b2a0f" > lcd_curline< / a > < / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Current line. Used for scrolling in text mode. < a href = "#76f8e26cf50274635b544f68752b2a0f" > < / a > < br > < / td > < / tr >
< / table >
< hr > < h2 > Function Documentation< / h2 >
< a class = "anchor" name = "35c08b1fa742e650f4873939707b893b" > < / a > <!-- doxytag: member="lc7981.c::lcd_clear" ref="35c08b1fa742e650f4873939707b893b" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_clear < / td >
< td > (< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Clears the display by setting the whole memory to 0.
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "dbf47a5efdf02367ded1ebf8f9edb5fe" > < / a > <!-- doxytag: member="lc7981.c::lcd_gotoxy" ref="dbf47a5efdf02367ded1ebf8f9edb5fe" args="(uint8_t x, uint8_t y)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_gotoxy < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > x< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > y< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Set the display cursor to a specific location.
< p >
Right now this does only work in text mode, since there's no need for it now in graphics mode. < br >
If the x and y values are to big, the function does nothing.< p >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > x< / em > < / td > < td > the horizontal cursorposition (starts at 0) < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > y< / em > < / td > < td > the vertical cursorposition (starts at 0) < / td > < / tr >
< / table >
< / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "9b18aca098d68e55bd7dd4b83f4f36e9" > < / a > <!-- doxytag: member="lc7981.c::lcd_init" ref="9b18aca098d68e55bd7dd4b83f4f36e9" args="(uint8_t mode)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_init < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > mode< / em > < / td >
< td > ) < / td >
< td width = "100%" > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
lcd_init set the to default values.
< p >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > mode< / em > < / td > < td > LCD_TEXT for text mode and LCD_GRAPHIC for graphic mode < / td > < / tr >
< / table >
< / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "f3b584ee8235c6ed4ebefc50f8a95915" > < / a > <!-- doxytag: member="lc7981.c::lcd_plot_bitmap" ref="f3b584ee8235c6ed4ebefc50f8a95915" args="(uint8_t x_off, uint8_t y_off, const uint8_t *bitmap, uint8_t w, uint8_t h)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_plot_bitmap < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > x_off< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > y_off< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const uint8_t * < / td >
< td class = "paramname" > < em > bitmap< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > w< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > h< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td width = "100%" > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-16 16:44:24 +02:00
< p >
This function will plot a bitmap with the upper left corner to the given coordinates.
2009-05-16 14:10:42 +02:00
< p >
2009-05-17 18:02:52 +02:00
< br >
If the bitmap doesn't fit on the display at this location, nothing is drawn at all.< br >
Unset pixels are treated as transparent < br >
This function is by far the most tricky piece of code in this project,< br >
don't worry if you don't understand it at first sight. < br >
And if you know a better way to do this, tell me.< br >
< p >
2009-05-17 18:35:27 +02:00
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > x< / em > < / td > < td > horizontal position of the bitmap < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > y< / em > < / td > < td > vertical position of the bitmap < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > bitmap< / em > < / td > < td > pointer to the bitmap in pgmspace < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > w< / em > < / td > < td > width of the bitmap < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > h< / em > < / td > < td > height of the bitmap< / td > < / tr >
< / table >
< / dl >
2009-05-17 18:02:52 +02:00
This function is dedicated to Greta, one of the most important persons in my life so far.< br >
Even though I can't remember her actual name.< br >
2009-05-16 14:10:42 +02:00
< / div >
< / div > < p >
< a class = "anchor" name = "735111507ed83172f58d5af2953e31c6" > < / a > <!-- doxytag: member="lc7981.c::lcd_plot_pixel" ref="735111507ed83172f58d5af2953e31c6" args="(uint8_t x, uint8_t y, uint8_t set)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_plot_pixel < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > x< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > y< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > set< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td width = "100%" > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
set or unset a pixel at the specified location
< p >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > x< / em > < / td > < td > horizontal position of the pixel (starts at 0) < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > y< / em > < / td > < td > horizontal position of the pixel (starts at 0) < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > set< / em > < / td > < td > can be PIXEL_ON or PIXEL_OFF < / td > < / tr >
< / table >
< / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "6334333537ad1d0bd51cba1e80f32e74" > < / a > <!-- doxytag: member="lc7981.c::lcd_read_byte" ref="6334333537ad1d0bd51cba1e80f32e74" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint8_t lcd_read_byte < / td >
< td > (< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Reads a byte from the display memory.
< p >
lcd_gotoxy can be used to set the location. Important : lcd_gotoxy doesn't work in graphics mode yet.< p >
< dl class = "return" compact > < dt > < b > Returns:< / b > < / dt > < dd > the byte which has been read < / dd > < / dl >
< dl class = "see" compact > < dt > < b > See also:< / b > < / dt > < dd > < a class = "el" href = "lc7981_8h.html#dbf47a5efdf02367ded1ebf8f9edb5fe" title = "Set the display cursor to a specific location." > lcd_gotoxy< / a > < / dd > < / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "b4f286d6a313df7a5f692e0b4a9509ad" > < / a > <!-- doxytag: member="lc7981.c::lcd_strobe" ref="b4f286d6a313df7a5f692e0b4a9509ad" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_strobe < / td >
< td > (< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Generates the strobe signal for writing data.
< p >
This function is meant for internal usage only.
< / div >
< / div > < p >
< a class = "anchor" name = "b69146a9179fc5b5deef3fc61cf0208c" > < / a > <!-- doxytag: member="lc7981.c::lcd_write_command" ref="b69146a9179fc5b5deef3fc61cf0208c" args="(uint8_t cmd, uint8_t data)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_write_command < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > cmd< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > data< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Writes a command and a data byte to the lcd.
< p >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > cmd< / em > < / td > < td > the command byte < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > data< / em > < / td > < td > the data that is going to be written after the command < / td > < / tr >
< / table >
< / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "30251238a49999658455fdb0233757fb" > < / a > <!-- doxytag: member="lc7981.c::lcd_write_text" ref="30251238a49999658455fdb0233757fb" args="(char *txt)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_write_text < / td >
< td > (< / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > txt< / em > < / td >
< td > ) < / td >
< td width = "100%" > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
< / div >
< / div > < p >
< hr > < h2 > Variable Documentation< / h2 >
< a class = "anchor" name = "76f8e26cf50274635b544f68752b2a0f" > < / a > <!-- doxytag: member="lc7981.c::lcd_curline" ref="76f8e26cf50274635b544f68752b2a0f" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint8_t < a class = "el" href = "lc7981_8c.html#76f8e26cf50274635b544f68752b2a0f" > lcd_curline< / a > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Current line. Used for scrolling in text mode.
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "a29c0577fe01129f48b5b21301d3ea49" > < / a > <!-- doxytag: member="lc7981.c::lcd_mode" ref="a29c0577fe01129f48b5b21301d3ea49" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint8_t < a class = "el" href = "lc7981_8c.html#a29c0577fe01129f48b5b21301d3ea49" > lcd_mode< / a > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Currently used mode, can be text or graphic.
< p >
< / div >
< / div > < p >
< / div >
2009-05-17 18:35:27 +02:00
< hr size = "1" > < address style = "text-align: right;" > < small > Generated on Sun May 17 18:34:49 2009 for glcd by
2009-05-16 14:10:42 +02:00
< a href = "http://www.doxygen.org/index.html" >
< img src = "doxygen.png" alt = "doxygen" align = "middle" border = "0" > < / a > 1.5.5 < / small > < / address >
< / body >
< / html >