REVISION
Definition in file lcd.c.
#include "../SYSTEM/sys_hardware.h"
#include "../SYSTEM/sys_main.h"
#include "../MESSAGE/message.h"
#include "lcd.h"
#include "lcd_assert.h"
Include dependency graph for lcd.c:

Go to the source code of this file.
Functions | |
| void | LCD_wrRect (const st_RECT *pRect, const unsigned short *pData) |
| Function writes rectangle area display data into LCD image buffer. | |
| void | LCD_scroll (const st_RECT *pRect, const st_BRUSH *pBrush, LCD_SCMODE mode, short pixelStep) |
| Function scrolls contents inside the specified rectangle in given mode and step size. | |
| void | LCD_refreshAll (void) |
| Function refreshes the entire LCD display. | |
| void | LCD_update (const st_RECT *pRect) |
| Function updates the rectangle dispaly area to LCD. | |
| void | LCD_refresh (const st_RECT *pRect) |
| Function refreshes the rectangle display area immediately. | |
| unsigned short * | LCD_rdRect (const st_RECT *pRect, unsigned short *pRdBuf) |
| Function reads back rectangle area display data in LCD image buffer, together with LCD_wrRect(...), application can directly manipulate the image buffer data. | |
| void | LCD_setCursor (short x, short y) |
| Function sets the active LCD cursor. | |
| void | LCD_printFld (const st_FIELD *pFld, st_LCDINFO *pInfo) |
| Function prints out the specified rectangle area. | |
| void | LCD_power (LCD_ONOFF power, unsigned int contrast) |
| Function serves as the LCD task handle. | |
| void | LCD_main (void) |
| Function serves as the LCD task handle. | |
| void | LCD__loadGraph (const st_POINT *pPnt, unsigned long graph) |
| Function copies bitmap to the LCD mirror buffer at location specified by upper left corner coordinates. | |
| void | LCD_graphSize (unsigned long graf, st_SIZE *size) |
| Function returns the graph size. | |
| void | LCD_invRect (const st_RECT *pRect) |
| Function inverts the rectangle area. | |
| void | LCD_drawRect (const st_RECT *pRect) |
| Function draws a rectangle in current LCD frame. | |
| void | LCD_setBrush (const st_BRUSH *brush) |
| Function sets up the active LCD brush, if no brush is passed in, clear the LCD brush. | |
| void | LCD_setPen (const st_PEN *pen) |
| Function sets up the active LCD pen, if no pen is passed in, clear the LCD pen. | |
| void | LCD_setFont (LCD_FONT font) |
| Function sets the selected font and loads all the font controls. | |
| void | LCD_setFrame (const st_RECT *frame) |
| Function sets up the display frame control. | |
| void | LCD_contrast (unsigned int contrast) |
| Function controls the LCD contrast. | |
| void | LCD__wrRect (const st_RECT *pRect, const unsigned short *pD) |
| Function writes to the Mirror buffer the specified data positioned by the specified rectangle. | |
| void | LCD__paintRect (const st_RECT *pRect, const st_BRUSH *pBrush) |
| Function paints the specified rectangle using the specified brush. | |
| unsigned short | LCD__loadData (unsigned short *pD, unsigned short bufLen, unsigned long dptr) |
| Function loads LCD display data into internal display data buffer. | |
| unsigned short | LCD__copyChar (unsigned short ch) |
| Function copies bitmap in character buffer into the LCD mirror buffer at location specified by LCD cursor. | |
| void | LCD__copyBmp (unsigned short *pBmp, const st_CURSOR *pCs, const st_SIZE *pSz) |
| Function copies bitmap to specified location. | |
| unsigned short | LCD__charWidth (unsigned short ch) |
| Function returns width of the specified character. | |
Variables | |
| BOOL | lcdOvlped |
| GLOBAL DATA. | |
|
|
Function returns width of the specified character.
Definition at line 2043 of file lcd.c. References st_LCD::chAddr, st_LCD::font, st_FONT::tabAddr, and st_FONT::tabLen. Referenced by LCD__copyChar(), and LCD_printFld(). 02044 {
02045 unsigned short width;
02046
02047 LCD_assert((ch&0xff00)==0, LCD__CHARWIDTH);
02048
02049 // Table upper boundary check.
02050 // Table low boundary assumed to be 0.
02051 if ( ch > Lcd.font.tabLen )
02052 {
02053 ch = 0x20; // Always print out a SPACE char if invalid char detected.
02054 }
02055
02056 /* Read and form address of character ch */
02057 GEN_readXdata((unsigned long)(Lcd.font.tabAddr + 2 + ch*2), (USHORT*)&Lcd.chAddr, 2);
02058
02059 /* Get the width of the character */
02060 GEN_readXdata((unsigned long)Lcd.chAddr, &width, 1);
02061
02062 return ( width&0x00FF );
02063 }
|
|
||||||||||||||||
|
Function copies bitmap to specified location. Also a boundary check will be carried out per to the active LCD frame, thus bitmap data can possibly be modified during function call.
Definition at line 1942 of file lcd.c. References st_RECT::br, st_LCD::frame, LCD__wrRect(), st_RECT::ul, st_POINT::x, and st_POINT::y. Referenced by LCD__copyChar(), and LCD__loadGraph(). 01943 {
01944 unsigned short csX = pCs->x;
01945 unsigned short csY = pCs->y;
01946 unsigned short szX = pSz->x;
01947 unsigned short szY = pSz->y;
01948 st_RECT rect;
01949 unsigned short rshift;
01950 unsigned short lshift;
01951 unsigned short hoffset;
01952 unsigned short colNum;
01953 unsigned short wordPerClm = (szY-1)/16+1;
01954 unsigned short * pD;
01955 unsigned short * pS;
01956 unsigned short * pT;
01957 unsigned short ii, jj, kk;
01958
01959 LCD_assert((unsigned int)pBmp, LCD__COPYBMP);
01960
01961 // Check display boundarys.
01962 if( (csX > Lcd.frame.br.x) ||
01963 (csY > Lcd.frame.br.y) ||
01964 ( (csX + szX - 1) < Lcd.frame.ul.x) ||
01965 ( (csY + szY - 1) < Lcd.frame.ul.y) ) return;
01966
01967 // Check upper left X.
01968 if( csX < Lcd.frame.ul.x )
01969 {
01970 rect.ul.x = Lcd.frame.ul.x;
01971 hoffset = (Lcd.frame.ul.x - csX) * wordPerClm;
01972 }
01973 else
01974 {
01975 rect.ul.x = csX;
01976 hoffset = 0;
01977 }
01978
01979 // Check upper left Y.
01980 if( csY < Lcd.frame.ul.y )
01981 {
01982 rect.ul.y = 0;
01983 lshift = Lcd.frame.ul.y - csY;
01984 }
01985 else
01986 {
01987 rect.ul.y = csY;
01988 lshift = 0;
01989 }
01990
01991 // Check bottom right X.
01992 if( csX + szX - 1 > Lcd.frame.br.x )
01993 {
01994 rect.br.x = Lcd.frame.br.x;
01995 }
01996 else
01997 {
01998 rect.br.x = csX + szX - 1;
01999 }
02000
02001 // Check bottom right Y.
02002 if((csY + szY - 1) > Lcd.frame.br.y)
02003 {
02004 rect.br.y = Lcd.frame.br.y;
02005
02006 // Shif buffer if necessary.
02007 colNum = rect.br.x-rect.ul.x+1;
02008
02009 pS = pBmp + hoffset + lshift/16;
02010 pD = pBmp;
02011
02012 lshift = lshift%16;
02013 rshift = 16 - lshift;
02014 jj = (rect.br.y-rect.ul.y)/16;
02015
02016 for( ii = 0; ii < colNum; ii++ )
02017 {
02018 pT = pS;
02019 for( kk = 0; kk <= jj; kk++ )
02020 {
02021 *pD = *pS++<<lshift;
02022 *pD++ |= *pS>>rshift;
02023 }
02024 pS = pT + wordPerClm;
02025 }
02026 }
02027 else
02028 {
02029 rect.br.y = csY + szY - 1;
02030 }
02031
02032 LCD__wrRect(&rect, pBmp);
02033 }
|
Here is the call graph for this function:

|
|
Function copies bitmap in character buffer into the LCD mirror buffer at location specified by LCD cursor. Also a boundary check will be carried out per to the active LCD frame.
Definition at line 1910 of file lcd.c. References st_LCD::chAddr, st_LCD::cs, st_LCD::font, st_FONT::h, LCD__charWidth(), and LCD__copyBmp(). Referenced by LCD_printFld(). 01911 {
01912 st_SIZE sz;
01913 unsigned short width;
01914
01915 LCD_assert((ch&0xff00)==0, LCD__COPYCHAR);
01916
01917 width = LCD__charWidth(ch);
01918 if(0 == width) return;
01919
01920 // Read in the font bitmap data.
01921 GEN_readXdata((unsigned long)Lcd.chAddr+1, LCD_chBuf, ((Lcd.font.h-1)/16+1)*width);
01922
01923 sz.x = width;
01924 sz.y = Lcd.font.h;
01925 LCD__copyBmp(LCD_chBuf, &Lcd.cs, &sz);
01926
01927 return width;
01928 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Function loads LCD display data into internal display data buffer.
Definition at line 1865 of file lcd.c. Referenced by LCD_printFld(), MENU__listMenuAction(), and MENU__playMenuAction(). 01866 {
01867 unsigned short count;
01868 unsigned short ii;
01869 unsigned short * pS;
01870
01871 // Check to unpack if necessary.
01872 // !!!NOTE!!!
01873 // This algorithm will not work when language other than English
01874 // is used. In that case we'll need to add font check here as well.
01875 // LCD_assert((unsigned int)((unsigned long)pD&dptr), LCD__LOADDATA);
01876
01877 count = GEN_readXstr(dptr, pD, bufLen);
01878 LCD_assert(count<=bufLen, LCD__LOADDATA2);
01879
01880 if( (*pD) & 0xFF00 )
01881 {
01882 count = (count>bufLen/2)? bufLen/2 : count;
01883
01884 pS = pD+count-1;
01885 pD = pD+count*2-1;
01886
01887 /* unpack string. */
01888 ii = count;
01889 while(ii--)
01890 {
01891 *pD-- = *pS&0x0ff;
01892 *pD-- = *pS-->>8;
01893 }
01894 count <<= 1;
01895 }
01896
01897 return count;
01898 }
|
|
||||||||||||
|
Function copies bitmap to the LCD mirror buffer at location specified by upper left corner coordinates. Also a boundary check will be carried out per to the active LCD frame. pGraph data format, +------+--------------------------------------------------------------+ | Word | | |Offset| Description. | +------+--------------------------------------------------------------+ | 0 | Size in pixels in X direction. | +------+--------------------------------------------------------------+ | 1 | Size in pixels in Y direction. | +------+--------------------------------------------------------------+ | 2 | Reserved. | +------+--------------------------------------------------------------+ | 3 | Data length in words. | +------+--------------------------------------------------------------+ | 4 | Bit map data. | +------+--------------------------------------------------------------+ | ... | | +------+--------------------------------------------------------------+ | N | Bit map data. | +------+--------------------------------------------------------------+
Definition at line 1353 of file lcd.c. References LCD__copyBmp(), and SYS_die(). Referenced by LCD_printFld(). 01354 {
01355 st_SIZE sz;
01356 unsigned short tmp;
01357 unsigned short* pD;
01358
01359 LCD_assert(graph != 0, LCD__LOADGRAPH);
01360
01361 GEN_readXdata(graph++, (USHORT*)&sz.x, 1);
01362 GEN_readXdata(graph++, (USHORT*)&sz.y, 1);
01363 graph++;
01364
01365 GEN_readXdata(graph++, &tmp, 1);
01366
01367 if(0 == tmp) return;
01368 #ifndef LCD_USEXDATA
01369 if( (pD = (unsigned short *)malloc(tmp) ) == NULL )
01370 #else
01371 if( (pD = (unsigned short *)nalloc(tmp) ) == NULL )
01372 #endif
01373 {
01374 SYS_die(LCD__LOADGRAPH);
01375 }
01376
01377 GEN_readXdata(graph, pD, tmp);
01378 LCD__copyBmp(pD, pPnt, &sz);
01379 #ifndef LCD_USEXDATA
01380 free(pD);
01381 #else
01382 nfree(pD);
01383 #endif
01384 }
|
Here is the call graph for this function:

|
||||||||||||
|
Function paints the specified rectangle using the specified brush. Function does not do rectangle validity check, it is the caller's responsibility to make sure rectangle is valid.
Definition at line 1760 of file lcd.c. References st_LCD::brush, and st_BRUSH::clr. Referenced by LCD_drawRect(), and LCD_scroll(). 01761 {
01762 unsigned short pattern;
01763 unsigned short * pBuf;
01764 unsigned short * pTmp;
01765 unsigned short clmWords;
01766 unsigned short clmNum;
01767 unsigned short stmask, endmask;
01768 unsigned short preshift, nextshift;
01769 unsigned short ii, jj;
01770 unsigned short ulX, ulY, brX, brY;
01771
01772 LCD_assertRect(*pRect, LCD__PAINTRECT);
01773
01774 if(pBrush == NULL) pBrush = &Lcd.brush;
01775 pattern = (pBrush->clr)? 0xFFFF : 0;
01776
01777 pBuf = LCD_mbuf;
01778
01779 ulX = pRect->ul.x;
01780 ulY = pRect->ul.y;
01781 brX = pRect->br.x;
01782 brY = pRect->br.y;
01783
01784 // Calculate the start word.
01785 pBuf += ulX*8 + ulY/16;
01786
01787 // Generate start word bit mask.
01788 // preshift = pRect->ul.y%16;
01789 preshift = ulY&0x0F;
01790 nextshift = 16 - preshift;
01791 stmask = _sbit_mask[preshift];
01792
01793 // Generate the end word bit mask.
01794 endmask = _ebit_mask[(brY&0x0F) + 1];
01795
01796 // Calculate total words per column.
01797 clmWords = ((brY - ulY + preshift) >> 4 ) + 1;
01798
01799 // Calculate total column numbers.
01800 clmNum = brX - ulX + 1;
01801
01802 // If column does not cross word boundary.
01803 if(clmWords == 1)
01804 {
01805 endmask |= stmask;
01806 stmask = (pattern&_sbit_mask[brY-ulY+1])>>preshift;
01807
01808 // Write buffer.
01809 for(ii = 0; ii < clmNum; ii++ )
01810 {
01811 *pBuf &= endmask;
01812 *pBuf |= stmask;
01813 pBuf += 8;
01814 }
01815 return;
01816 }
01817
01818 pTmp = pBuf;
01819 // Write buffer while column crosses word boundary.
01820 // Process the start word.
01821 for(ii = 0; ii < clmNum; ii++ )
01822 {
01823 *pBuf &= stmask;
01824 *pBuf |= (pattern>>preshift);
01825 pBuf += 8;
01826 }
01827
01828 // Process the whole column word if any.
01829 for(jj = 0; jj < clmWords - 2; jj++)
01830 {
01831 pBuf = ++pTmp;
01832
01833 stmask = (pattern<<nextshift)|(pattern>>preshift);
01834 for(ii = 0; ii < clmNum; ii++ )
01835 {
01836 *pBuf = stmask;
01837 pBuf += 8;
01838 }
01839 }
01840
01841 // Process the end word.
01842 pBuf = pTmp + 1;
01843 stmask = ((pattern<<nextshift)|(pattern>>preshift))&(~endmask);
01844 for(ii = 0; ii < clmNum; ii++ )
01845 {
01846 *pBuf &= endmask;
01847 *pBuf |= stmask;
01848
01849 pBuf += 8;
01850 }
01851 }
|
|
||||||||||||
|
Function writes to the Mirror buffer the specified data positioned by the specified rectangle. The upper half buffer corresponds to the significant bit of the gray scaled LCD pixel. It is the caller's responsibility to make sure rectangle always drops in valid display area. It is also the caller's responsibility to make sure pData points to valid data.
Definition at line 1645 of file lcd.c. References st_RECT::ul, st_POINT::x, and st_POINT::y. Referenced by LCD__copyBmp(), and LCD_wrRect(). 01646 {
01647 unsigned short * pBuf;
01648 unsigned short * pTmp;
01649 const unsigned short * pDtmp;
01650 unsigned short dptrOffset;
01651 unsigned short clmWords;
01652 unsigned short clmNum;
01653 unsigned short stmask, endmask, rvsendmask;
01654 unsigned short preshift, nextshift;
01655 unsigned short ii, jj, tmp;
01656 unsigned short ulX, ulY, brX, brY;
01657
01658 LCD_assertRect(*pRect, LCD__WRRECT);
01659 LCD_assert((unsigned short)pD, LCD__WRRECT2);
01660
01661 pBuf = LCD_mbuf;
01662
01663 ulX = pRect->ul.x;
01664 ulY = pRect->ul.y;
01665 brX = pRect->br.x;
01666 brY = pRect->br.y;
01667
01668 // Calculate the start word.
01669 pBuf += ulX*8 + ulY/16;
01670
01671 // Generate start word bit mask.
01672 // preshift = pRect->ul.y%16;
01673 preshift = ulY&0x0F;
01674 nextshift = 16 - preshift;
01675 stmask = _sbit_mask[preshift];
01676
01677 // Generate the end word bit mask.
01678 endmask = _ebit_mask[(brY&0x0F) + 1];
01679 rvsendmask = ~endmask;
01680
01681 // Calculate total words per column.
01682 clmWords = ((brY - ulY + preshift) >> 4 ) + 1;
01683
01684 // Calculate total column numbers.
01685 clmNum = brX - ulX + 1;
01686
01687 // If column does not cross word boundary.
01688 if(clmWords == 1)
01689 {
01690 endmask |= stmask;
01691 stmask = _sbit_mask[brY-ulY+1];
01692
01693 /* Write buffer. */
01694 for(ii = 0; ii < clmNum; ii++ )
01695 {
01696 *pBuf &= endmask;
01697 *pBuf |= (((*pD++)&stmask)>>preshift);
01698 pBuf += 8;
01699 }
01700 return;
01701 }
01702
01703 dptrOffset = ((brY-ulY) >> 4) + 1;
01704 pTmp = pBuf;
01705 pDtmp = pD;
01706
01707 // Write buffer while column crosses word boundary.
01708 // Process the start word.
01709 for(ii = 0; ii < clmNum; ii++ )
01710 {
01711 *pBuf &= stmask;
01712 *pBuf |= (*pD>>preshift);
01713 pBuf += 8;
01714 pD += dptrOffset;
01715 }
01716
01717 pD = pDtmp;
01718
01719 // Process the whole column word if any.
01720 for(jj = 0; jj < clmWords - 2; jj++)
01721 {
01722 pBuf = ++pTmp;
01723 for(ii = 0; ii < clmNum; ii++ )
01724 {
01725 *pBuf = (*pD++)<<nextshift;
01726 *pBuf |= ((*pD) >> preshift);
01727 pBuf += 8;
01728 pD += dptrOffset-1;
01729 }
01730 pD = ++pDtmp;
01731 }
01732
01733 // Process the end word.
01734 pBuf = pTmp + 1;
01735 for(ii = 0; ii < clmNum; ii++ )
01736 {
01737 *pBuf &= endmask;
01738 tmp = (*pD++)<<nextshift;
01739 tmp |= ( (*pD) >> preshift);
01740 tmp &= rvsendmask;
01741
01742 *pBuf |= tmp;
01743
01744 pBuf += 8;
01745 pD += dptrOffset-1;
01746 }
01747 }
|
|
|
Function controls the LCD contrast.
Definition at line 1621 of file lcd.c. Referenced by MENU__setContrast(). 01622 {
01623 unsigned int temp;
01624
01625 /* Read to clear port to send LCD commands. */
01626 temp = RS_CTRL;
01627 asm(" nop");
01628
01629 LCD_ACCESS = LCD_CMD__VOLUME_REGISTER;
01630 LCD_ACCESS = contrast + LCD_CONTRAST_OFFSET;
01631 }
|
|
|
Function draws a rectangle in current LCD frame.
Definition at line 1498 of file lcd.c. References st_RECT::br, st_LCD::brush, st_PEN::clr, st_BRUSH::clr, LCD__paintRect(), st_LCD::pen, st_PEN::sz, st_RECT::ul, st_POINT::x, and st_POINT::y. Referenced by MENU__create(), MENU__createDjMenu(), MENU__createListMenu(), MENU__createMsgBox(), MENU__createMyfiGainMenu(), MENU__createShadow(), MENU__createVolumeMenu(), MENU__listMenuAction(), MENU__myfiChannelControl(), MENU__myfiGainControl(), MENU__playMenuAction(), MENU__sbarInit(), MENU__vbarInit(), MENU__volumeControl(), MENU__XIMaction(), MENU_create(), MENU_statusBar(), and MENU_update(). 01499 {
01500 st_RECT rect;
01501 st_BRUSH brush;
01502 unsigned short ulX, ulY, brX, brY;
01503
01504 ulX = pRect->ul.x;
01505 ulY = pRect->ul.y;
01506 brX = pRect->br.x;
01507 brY = pRect->br.y;
01508
01509 LCD_assertRect(*pRect, LCD_DRAWRECT);
01510
01511 if(Lcd.pen.clr != 0)
01512 {
01513 brush.clr = Lcd.pen.clr;
01514 LCD__paintRect(pRect, &brush);
01515 // Check if pen is too large.
01516 if( ((brX-ulX) <= Lcd.pen.sz.x)||((brY-ulY) <= Lcd.pen.sz.y) ) return;
01517 }
01518 rect.ul.x = ulX+Lcd.pen.sz.x;
01519 rect.ul.y = ulY+Lcd.pen.sz.y;
01520 rect.br.x = brX-Lcd.pen.sz.x;
01521 rect.br.y = brY-Lcd.pen.sz.y;
01522
01523 LCD__paintRect(&rect, &Lcd.brush);
01524 }
|
Here is the call graph for this function:

|
||||||||||||
|
Function returns the graph size.
Definition at line 1396 of file lcd.c. Referenced by MENU__createListMenu(), and MENU__listMenuAction(). 01397 {
01398 GEN_readXdata(graf++, (USHORT*)(&size->x), 1);
01399 GEN_readXdata(graf++, (USHORT*)(&size->y), 1);
01400 }
|
|
|
Function inverts the rectangle area.
Definition at line 1408 of file lcd.c. Referenced by MENU__createDateTimeMenu(), MENU__createListMenu(), MENU__createMsgBox(), MENU__listMenuAction(), MENU__msgBoxAction(), MENU__XIMaction(), MENU_statusBar(), and MENU_update(). 01409 {
01410 unsigned short * pBuf;
01411 unsigned short * pTmp;
01412 unsigned short clmWords;
01413 unsigned short clmNum;
01414 unsigned short stmask, endmask, rvsendmask;
01415 unsigned short preshift;
01416 unsigned short ii, jj, tmp;
01417 unsigned short ulX, ulY, brX, brY;
01418
01419
01420 pBuf = LCD_mbuf;
01421
01422 ulX = pRect->ul.x;
01423 ulY = pRect->ul.y;
01424 brX = pRect->br.x;
01425 brY = pRect->br.y;
01426
01427 // Calculate the start word.
01428 pBuf += ulX*8 + ulY/16;
01429
01430 // Generate start word bit mask.
01431 // preshift = pRect->ul.y%16;
01432 preshift = ulY&0x0F;
01433 stmask = _sbit_mask[preshift];
01434
01435 // Generate the end word bit mask.
01436 endmask = _ebit_mask[(brY&0x0F) + 1];
01437 rvsendmask = ~endmask;
01438
01439 // Calculate total words per column.
01440 clmWords = ((brY - ulY + preshift) >> 4 ) + 1;
01441
01442 // Calculate total column numbers.
01443 clmNum = brX - ulX + 1;
01444
01445 // If column does not cross word boundary.
01446 if(clmWords == 1)
01447 {
01448 endmask |= stmask;
01449 stmask = ~endmask;
01450
01451 /* Write buffer. */
01452 for(ii = 0; ii < clmNum; ii++ )
01453 {
01454 *pBuf = (*pBuf&endmask)|((~(*pBuf))&stmask);
01455 pBuf += 8;
01456 }
01457 return;
01458 }
01459
01460 pTmp = pBuf;
01461
01462 // Write buffer while column crosses word boundary.
01463 // Process the start word.
01464 tmp = ~stmask;
01465 for(ii = 0; ii < clmNum; ii++ )
01466 {
01467 *pBuf = (*pBuf&stmask)|((~(*pBuf))&tmp);
01468 pBuf += 8;
01469 }
01470
01471 // Process the whole column word if any.
01472 for(jj = 0; jj < clmWords - 2; jj++)
01473 {
01474 pBuf = ++pTmp;
01475 for(ii = 0; ii < clmNum; ii++ )
01476 {
01477 *pBuf = ~(*pBuf);
01478 pBuf += 8;
01479 }
01480 }
01481
01482 // Process the end word.
01483 pBuf = pTmp + 1;
01484 for(ii = 0; ii < clmNum; ii++ )
01485 {
01486 *pBuf = (*pBuf&endmask)|((~(*pBuf))&rvsendmask);
01487 pBuf += 8;
01488 }
01489 }
|
|
||||||||||||
|
Function serves as the LCD task handle.
user application setup begin * user LCD power setup begin * Definition at line 1131 of file lcd.c. References st_RECT::br, GEN_zeroOut(), LCD_refresh(), st_RECT::ul, st_POINT::x, and st_POINT::y. Referenced by SYS_die(), and UI_PSF_sleep(). 01132 {
01133 unsigned short temp;
01134 unsigned short counter;
01135 st_RECT rect;
01136
01137 LCD_NOTOVLPED();
01138
01139 if ( power == LCD_POWER_ON ) {
01140
01141 // Read to clear port.
01142 temp = RS_CTRL;
01143 asm(" nop");
01144
01146 LCD_ACCESS = LCD_CMD__SETPD_DUTY_RATIO;
01147
01148 LCD_ACCESS = 0x80;
01149
01150 LCD_ACCESS = LCD_CMD__ADC|ADC_REVERSE_DSP;
01151
01152 LCD_ACCESS = LCD_CMD__SHL|SHL_NORMAL;
01153
01154
01155 LCD_ACCESS = LCD_CMD__COM0;
01156
01157 LCD_ACCESS = 0;
01158
01160 LCD_ACCESS = LCD_CMD__OSCILLATOR;
01161
01162 LCD_ACCESS = LCD_CMD__DC_DC|DC_DC_4;
01163
01164 LCD_ACCESS = LCD_CMD__REGULATOR_RESISTOR|6;
01165
01166 LCD_ACCESS = LCD_CMD__VOLUME_REGISTER;
01167 LCD_ACCESS = contrast + LCD_CONTRAST_OFFSET;
01168
01169 LCD_ACCESS = LCD_CMD__BIAS|BIAS_9;
01170
01171
01172 LCD_ACCESS = LCD_CMD__FRC_PWM_MODE | FRC_4 | PWM_9;
01173
01174 // White mode
01175 LCD_ACCESS = LCD_CMD__GRAYSCALE_MODE|GRAY_SCALE_MODE_0;
01176 LCD_ACCESS = 0x00;
01177
01178 LCD_ACCESS = LCD_CMD__GRAYSCALE_MODE|GRAY_SCALE_MODE_1;
01179 LCD_ACCESS = 0x00;
01180
01181 LCD_ACCESS = LCD_CMD__GRAYSCALE_MODE|GRAY_SCALE_MODE_2;
01182 LCD_ACCESS = 0x33;
01183 //LCD_ACCESS = 0x00;
01184
01185 LCD_ACCESS = LCD_CMD__GRAYSCALE_MODE|GRAY_SCALE_MODE_3;
01186 LCD_ACCESS = 0x33;
01187 //LCD_ACCESS = 0x00;
01188
01189 LCD_ACCESS = LCD_CMD__GRAYSCALE_MODE|GRAY_SCALE_MODE_4;
01190 LCD_ACCESS = 0x66;
01191 //LCD_ACCESS = 0x00;
01192
01193 LCD_ACCESS = LCD_CMD__GRAYSCALE_MODE|GRAY_SCALE_MODE_5;
01194 LCD_ACCESS = 0x66;
01195 //LCD_ACCESS = 0x00;
01196
01197 LCD_ACCESS = LCD_CMD__GRAYSCALE_MODE|GRAY_SCALE_MODE_6;
01198 LCD_ACCESS = 0x99;
01199
01200 LCD_ACCESS = LCD_CMD__GRAYSCALE_MODE|GRAY_SCALE_MODE_7;
01201 LCD_ACCESS = 0x99;
01202
01203
01204 LCD_ACCESS = LCD_CMD__POWER_CONTROL|POWER_CONTROL_ALL_ON;
01205 asm( " nop");
01206
01207 // end of LCD power on setup.
01208
01209 // wait for the initialization done
01210 counter = 0;
01211
01212 do
01213 {
01214 temp = LCD_ACCESS;
01215 counter++;
01216 }while( (temp & 0x80) && (counter != 0x7FFF) );
01217
01218 /* Refresh the cleared display buffer. */
01219 GEN_zeroOut((UINT16*)LCD_mbuf, LCD_MIRROR_BUF_SZ);
01220 rect.ul.x = rect.ul.y = 0;
01221 rect.br.x = LCD_XMAX;
01222 rect.br.y = LCD_YMAX;
01223 LCD_refresh(&rect);
01224
01225 LCD_ACCESS = LCD_CMD__DISPLAY | DISPLAY_ON;
01226 LCD_ACCESS = LCD_CMD__ENTIRE_DISPLAY | ENTIRE_DISPLAY_OFF;
01227 }
01228
01229 else if( power == LCD_POWER_OFF)
01230 {
01231 temp = RS_CTRL;
01232 LCD_ACCESS = LCD_CMD__ENTIRE_DISPLAY | ENTIRE_DISPLAY_OFF;
01233 LCD_ACCESS = LCD_CMD__DISPLAY | DISPLAY_OFF;
01234 asm(" nop");
01235
01236 LCD_ACCESS = LCD_CMD__RESET;
01237 asm(" nop");
01238
01239 LCD_ACCESS = LCD_CMD__POWER_CONTROL|POWER_CONTROL_ALL_OFF;
01240 asm(" nop");
01241 }
01242 }
|
Here is the call graph for this function:

|
||||||||||||
|
Function prints out the specified rectangle area.
Definition at line 732 of file lcd.c. References st_LINEINFO::chNum, st_LCD::chsp, st_LCD::cs, st_LCD::font, st_LCD::frame, st_FONT::h, LCD__charWidth(), LCD__copyChar(), LCD__loadData(), LCD__loadGraph(), LCD_FONT, LCD_setCursor(), LCD_setFont(), st_LINEFIFO::lninfo, st_LINEINFO::moreCh, st_LINEINFO::pC, st_LINEINFO::ul, st_POINT::x, st_POINT::y, and st_LINEFIFO::Yoffset. Referenced by MENU__create(), MENU__createDbRecordInfoMenu(), MENU__createDjMenu(), MENU__createListMenu(), MENU__createMsgBox(), MENU__createMyfiChannelMenu(), MENU__createMyfiGainMenu(), MENU__createPlayMenu(), MENU__createPresetMenu(), MENU__createPropertiesMenu(), MENU__createSynclogMenu(), MENU__createVolumeMenu(), MENU__listMenuAction(), MENU__myfiChannelControl(), MENU__playMenuAction(), MENU_statusBar(), and MENU_update(). 00733 {
00734 unsigned short num, ii, w, chars=0;
00735 unsigned short Yoffset;
00736 unsigned short * pC;
00737 st_LINEINFO * pLnInfo;
00738 st_CURSOR cs;
00739
00740 LCD_assert((unsigned short)pFld, LCD_PRINTFLD);
00741 LCD_assertRect(pFld->rc, LCD_PRINTFLD2);
00742
00743 if( pFld->dptr == 0 ) return;
00744
00745 Lcd.frame = pFld->rc;
00746
00747 if( !(pFld->attr&FLD_ATTR_CURSOR) ) LCD_setCursor(pFld->rc.ul.x, pFld->rc.ul.y);
00748
00749 if( pFld->attr&FLD_ATTR_TXTFLD )
00750 {
00751 LCD_setFont((LCD_FONT)(pFld->attr&FLD_ATTR_TXTFONT));
00752 LCD__loadData(LCD_dbuf, LCD_STR_DATABUF_SZ, pFld->dptr);
00753 LCD__lnfifo(pFld, pInfo);
00754
00755 pLnInfo = &LCD_lnfifo.lninfo[0];
00756 Yoffset = LCD_lnfifo.Yoffset;
00757 while( num = pLnInfo->chNum )
00758 {
00759 LCD_setCursor(pLnInfo->ul.x, pLnInfo->ul.y+Yoffset);
00760
00761 pC = pLnInfo->pC;
00762 for(ii = 0; ii < num; ii++)
00763 {
00764 w = LCD__copyChar(*pC++);
00765 if(w) Lcd.cs.x += (w + Lcd.chsp);
00766 }
00767
00768 if( Lcd.cs.y+Lcd.font.h-1 <= pFld->rc.br.y )
00769 {
00770 chars += num;
00771 cs.x = Lcd.cs.x;
00772 cs.y = Lcd.cs.y;
00773 }
00774
00775 if(pLnInfo->moreCh)
00776 {
00777 w = LCD__copyChar(pLnInfo->moreCh);
00778 if(w) Lcd.cs.x += (w + Lcd.chsp);
00779 }
00780
00781 pLnInfo++;
00782 }
00783
00784 /* Setup print info. */
00785 if(pInfo)
00786 {
00787 if(chars == 0)
00788 {
00789 chars = num;
00790 cs.x = Lcd.cs.x;
00791 cs.y = Lcd.cs.y;
00792 }
00793 else
00794 {
00795
00796 pC = LCD_lnfifo.lninfo[0].pC+chars;
00797 while(cs.x > pFld->rc.br.x)
00798 {
00799 chars--;
00800 pC--;
00801 cs.x = cs.x-LCD__charWidth(*pC)-Lcd.chsp;
00802 }
00803 }
00804
00805 pInfo->num = chars;
00806 pInfo->cs = cs;
00807 }
00808 }
00809
00810 else LCD__loadGraph(&Lcd.cs, pFld->dptr);
00811 }
|
Here is the call graph for this function:

|
||||||||||||
|
Function reads back rectangle area display data in LCD image buffer, together with LCD_wrRect(...), application can directly manipulate the image buffer data.
Definition at line 644 of file lcd.c. References SYS_die(), st_POINT::x, and st_POINT::y. Referenced by MENU__preserve(), MENU__restore(), and MENU_create(). 00645 {
00646 unsigned short * pD;
00647 unsigned short * pT;
00648 unsigned short * pBuf;
00649 unsigned short * pTmp;
00650 unsigned short len;
00651 unsigned short clmNum, clmWords;
00652 unsigned short preshift, nextshift;
00653 unsigned short ulX, ulY, brX, brY;
00654
00655 LCD_assertRect(*pRect, LCD_RDRECT);
00656
00657 ulX = pRect->ul.x;
00658 ulY = pRect->ul.y;
00659 brX = pRect->br.x;
00660 brY = pRect->br.y;
00661
00662 // Calculate the start word.
00663 pBuf = LCD_mbuf+ulX*8 + ulY/16;
00664
00665 preshift = ulY&0x0F;
00666 nextshift = 16 - preshift;
00667
00668 // Calculate total words per column.
00669 clmWords = ((brY-ulY)>>4) + 1;
00670
00671 // Calculate total column numbers.
00672 clmNum = brX-ulX+1;
00673
00674 len = clmNum*clmWords;
00675
00676 if(pRdBuf == NULL)
00677 {
00678 #ifndef LCD_USEXDATA
00679 pD = (unsigned short *)malloc(len+1);
00680 #else
00681 pD = (unsigned short *)nalloc(len+1);
00682 #endif
00683 if( NULL == pD ) SYS_die(LCD_RDRECT);
00684 }
00685 else pD = pRdBuf;
00686
00687 *pD = len;
00688 pT = pD+1;
00689
00690 // Read buffer while column crosses word boundary.
00691 for(ulX = 0; ulX < clmNum; ulX++ )
00692 {
00693 pTmp = pBuf;
00694 for(ulY = 0; ulY < clmWords; ulY++)
00695 {
00696 *pT = *pBuf<<preshift;
00697 pBuf++;
00698 *pT |= *pBuf>>(nextshift);
00699 pT++;
00700 }
00701 pBuf = pTmp+8;
00702 }
00703
00704 return pD;
00705 }
|
Here is the call graph for this function:

|
|
Function refreshes the rectangle display area immediately.
Definition at line 423 of file lcd.c. References st_RECT::br, st_RECT::ul, st_POINT::x, and st_POINT::y. Referenced by LCD_main(), LCD_power(), and LCD_refreshAll(). 00424 {
00425 LCD_assertRect(*pRect, LCD_REFRESH);
00426
00427 #ifdef LCD_GRAYSCALED_OVLP
00428 if(TRUE == lcdOvlped)
00429 {
00430 if(pRect->ul.x) LCD__refresh(pRect, 1);
00431 else
00432 {
00433 if(0 == pRect->ul.y)
00434 {
00435 st_RECT rect;
00436 LCD_assertRect(lcdOvlpRc, LCD_REFRESH2);
00437
00438 rect.ul.x = pRect->ul.x;
00439 rect.ul.y = pRect->ul.y;
00440 rect.br.x = pRect->br.x;
00441 rect.br.y = lcdOvlpRc.ul.y-1;
00442 LCD__refresh(&rect, 2);
00443
00444 rect.ul.x = pRect->ul.x;
00445 rect.ul.y = lcdOvlpRc.ul.y;
00446 rect.br.x = lcdOvlpRc.ul.x-1;
00447 rect.br.y = lcdOvlpRc.br.y;
00448 LCD__refresh(&rect, 2);
00449
00450 rect.ul.x = lcdOvlpRc.br.x+1;
00451 rect.ul.y = lcdOvlpRc.ul.y;
00452 rect.br.x = pRect->br.x;
00453 rect.br.y = lcdOvlpRc.br.y;
00454 LCD__refresh(&rect, 2);
00455
00456 rect.ul.x = pRect->ul.x;
00457 rect.ul.y = lcdOvlpRc.br.y+1;
00458 rect.br.x = pRect->br.x;
00459 rect.br.y = pRect->br.y;
00460 LCD__refresh(&rect, 3);
00461
00462 LCD__refresh(&lcdOvlpRc, 1);
00463 }
00464 else LCD__refresh(pRect, 0);
00465 }
00466 }
00467 else LCD__refresh(pRect, 0);
00468 #else
00469 LCD__refresh(pRect, 0);
00470 #endif
00471 }
|
|
||||||||||||||||||||
|
Function scrolls contents inside the specified rectangle in given mode and step size. If brush is specified, the background will be painted to fill the area left by scrolling. NOTE: operation is not affected by active LCD frame.
Definition at line 137 of file lcd.c. References st_RECT::br, st_BRUSH::clr, LCD__paintRect(), LCD_SCMODE, SC_CIRH, SC_CIRV, SC_HORZ, SC_VERT, st_RECT::ul, st_POINT::x, and st_POINT::y. Referenced by MENU__listMenuAction(). 00141 {
00142 short step;
00143 unsigned short * pBuf;
00144 unsigned short * pTmp;
00145 unsigned short * pS;
00146 unsigned short clmWords;
00147 unsigned short clmNum;
00148 unsigned short stmask, endmask;
00149 unsigned short wdoffset;
00150 unsigned short ii, jj;
00151 unsigned short ulX, ulY, brX, brY;
00152 st_RECT rect;
00153 st_BRUSH brush;
00154
00155 LCD_assertRect(*pRect, LCD_SCROLL);
00156
00157 if( 0 == pixelStep ) return;
00158 if(pBrush == NULL)
00159 {
00160 brush.clr = 0;
00161 pBrush = &brush;
00162 }
00163
00164 ulX = pRect->ul.x;
00165 ulY = pRect->ul.y;
00166 brX = pRect->br.x;
00167 brY = pRect->br.y;
00168
00169 // Generate start word bit mask.
00170 // preshift = pRect->ul.y%16;
00171 ii = ulY&0x0F;
00172 stmask = _sbit_mask[ii];
00173
00174 // Calculate total words per column.
00175 clmWords = ((brY - ulY + ii) >> 4 ) + 1;
00176
00177 // Generate the end word bit mask.
00178 jj = (brY&0x0F)+1;
00179 endmask = _ebit_mask[jj];
00180
00181 // Calculate total column numbers.
00182 clmNum = brX - ulX + 1;
00183
00184 step = ( 0>pixelStep)? -pixelStep: pixelStep;
00185 switch(mode)
00186 {
00187 case SC_HORZ:
00188 rect.ul.y = ulY;
00189 rect.br.y = brY;
00190
00191 if( step >= clmNum )
00192 {
00193 LCD__paintRect(pRect, pBrush);
00194 return;
00195 }
00196
00197 clmNum -= step;
00198 if( 0 > pixelStep ) // scroll right
00199 {
00200 step = -8;
00201 rect.ul.x = ulX;
00202 rect.br.x = ulX-pixelStep-1;
00203 pBuf = LCD_mbuf + brX*8 + ulY/16;
00204 }
00205 else // scroll left.
00206 {
00207 step = 8;
00208 rect.ul.x = brX-pixelStep+1;
00209 rect.br.x = brX;
00210 pBuf = LCD_mbuf + ulX*8 + ulY/16;
00211 }
00212
00213 pTmp = pBuf;
00214 pixelStep *= 8;
00215
00216 // Reversed start mask.
00217 ulX = ~stmask;
00218
00219 // Process the start word.
00220 for(ii = 0; ii < clmNum; ii++ )
00221 {
00222 *pBuf &= stmask;
00223 *pBuf |= (*(pBuf+pixelStep)&ulX);
00224 pBuf += step;
00225 }
00226
00227 // Process the whole column word if any.
00228 for(jj = 0; jj < clmWords - 2; jj++)
00229 {
00230 pBuf = ++pTmp;
00231 for(ii = 0; ii < clmNum; ii++ )
00232 {
00233 *pBuf = *(pBuf+pixelStep);
00234 pBuf += step;
00235 }
00236 }
00237
00238 if( 1 < clmWords )
00239 {
00240 // Process the end word.
00241 pBuf = pTmp+1;
00242 ulX = ~endmask;
00243 for(ii = 0; ii < clmNum; ii++ )
00244 {
00245 *pBuf &= endmask;
00246 *pBuf |= ((*(pBuf+pixelStep))&ulX);
00247 pBuf += step;
00248 }
00249 }
00250 break;
00251
00252 case SC_VERT:
00253 rect.ul.x = ulX;
00254 rect.br.x = brX;
00255
00256 if( step >= brY-ulY+1 )
00257 {
00258 LCD__paintRect(pRect, pBrush);
00259 return;
00260 }
00261
00262 if( 0 > pixelStep ) // scroll down
00263 {
00264 rect.ul.y = ulY;
00265 rect.br.y = ulY-pixelStep-1;
00266 pBuf = LCD_mbuf + ulX*8 + brY/16;
00267
00268 if( 1 == clmWords )
00269 {
00270 endmask |= stmask;
00271 ulX =~endmask;
00272 for(ii = 0; ii < clmNum; ii++ )
00273 {
00274 *pBuf = (((*pBuf&ulX)>>step)&ulX)|(*pBuf&endmask);
00275 pBuf += 8;
00276 }
00277 break;
00278 }
00279
00280 // Column cross words.
00281 wdoffset = step/16;
00282 clmWords -= 2+wdoffset-1;
00283
00284 step &= 0x0f;
00285 ulY = 16-step;
00286
00287 pTmp = pBuf;
00288
00289 ulX = ~endmask;
00290 pixelStep = ~stmask; // reversed start mask.
00291
00292 for(ii = 0; ii < clmNum; ii++ )
00293 {
00294 pBuf = pTmp;
00295 pS = pBuf-wdoffset;
00296
00297 // Process end word.
00298 *pBuf = (*pBuf&endmask)|(((*pS>>step)|(*(pS-1)<<ulY))&ulX);
00299 pBuf--;
00300 pS--;
00301 // Process the whole column word if any.
00302 for(jj = 1; jj < clmWords; jj++)
00303 {
00304 *pBuf = *pS>>step;
00305 *pBuf |= *(pS-1)<<ulY;
00306 pBuf--;
00307 pS--;
00308 }
00309
00310 // Process the start word.
00311 *pBuf = ((*pS&pixelStep)>>step)|(*pS&stmask);
00312
00313 pTmp += 8;
00314 }
00315 }
00316 else // scroll up.
00317 {
00318 rect.ul.y = brY-pixelStep+1;
00319 rect.br.y = brY;
00320 pBuf = LCD_mbuf + ulX*8 + ulY/16;
00321
00322 if( 1 == clmWords )
00323 {
00324 endmask |= stmask;
00325 ulX =~endmask;
00326 for(ii = 0; ii < clmNum; ii++ )
00327 {
00328 *pBuf = (((*pBuf&ulX)<<step)&ulX)|(*pBuf&endmask);
00329 pBuf += 8;
00330 }
00331 break;
00332 }
00333
00334 // Column cross words.
00335 wdoffset = step/16;
00336 clmWords -= 2+wdoffset-1;
00337
00338 step &= 0x0f;
00339 ulY = 16-step;
00340
00341 pTmp = pBuf;
00342
00343 ulX = ~endmask;
00344 pixelStep = ~stmask; // reversed start mask.
00345
00346 for(ii = 0; ii < clmNum; ii++ )
00347 {
00348 pBuf = pTmp;
00349 pS = pBuf+wdoffset;
00350
00351 // Process start word.
00352 *pBuf = (*pBuf&stmask)|(((*pS<<step)|(*(pS+1)>>ulY))&pixelStep);
00353 pBuf++;
00354 pS++;
00355
00356 // Process the whole column word if any.
00357 for(jj = 1; jj < clmWords; jj++)
00358 {
00359 *pBuf = *pS<<step;
00360 *pBuf |= *(pS+1)>>ulY;
00361 pBuf++;
00362 pS++;
00363 }
00364
00365 // Process the end word.
00366 *pBuf = ((*pS&ulX)<<step)|(*pS&endmask);
00367
00368 pTmp += 8;
00369 }
00370 }
00371 break;
00372
00373 case SC_CIRH:
00374 case SC_CIRV:
00375 default: break;
00376 }
00377
00378 LCD__paintRect(&rect, pBrush);
00379 }
|
Here is the call graph for this function:

|
|
Function sets up the active LCD brush, if no brush is passed in, clear the LCD brush.
Definition at line 1533 of file lcd.c. References st_LCD::brush, and st_BRUSH::clr. Referenced by MENU__create(), MENU__createDjMenu(), MENU__createListMenu(), MENU__createMsgBox(), MENU__createMyfiGainMenu(), MENU__createShadow(), MENU__createVolumeMenu(), MENU__listMenuAction(), MENU__myfiChannelControl(), MENU__myfiGainControl(), MENU__playMenuAction(), MENU__sbarInit(), MENU__vbarInit(), MENU__volumeControl(), MENU__XIMaction(), MENU_create(), MENU_statusBar(), MENU_update(), and SYS_die(). 01534 {
01535 if(brush)
01536 {
01537 memcpy(&Lcd.brush, brush, sizeof(st_BRUSH));
01538 }
01539 else
01540 {
01541 /* If NULL brush, clear brush. */
01542 Lcd.brush.clr = 0;
01543 }
01544 }
|
|
||||||||||||
|
Function sets the active LCD cursor.
Definition at line 716 of file lcd.c. References st_LCD::cs. Referenced by LCD_printFld().
|
|
|
Function sets the selected font and loads all the font controls.
Definition at line 1578 of file lcd.c. References st_LCD::chsp, st_LCD::font, FONT_NULL, st_LCD::fontID, st_FONT::gray, st_FONT::h, st_LCD::lnsp, st_LCD::pChbuf, st_FONT::tabAddr, st_FONT::tabLen, and st_FONT::w. Referenced by LCD_printFld(), and SYS_die(). 01579 {
01580 unsigned short temp[6];
01581
01582 if(FONT_NULL == font) return;
01583
01584 Lcd.fontID = font;
01585
01586 // Get the start address of fontX table and height of the font.
01587 GEN_readXdata((unsigned long)FONT_TABLES + (unsigned short)font*6, &temp[0], 6);
01588
01589 Lcd.font.tabAddr = ((unsigned long)temp[0]<<16) | (unsigned long)temp[1];
01590 GEN_readXdata((unsigned long)Lcd.font.tabAddr, &Lcd.font.tabLen, 1);
01591
01592 // Load character height, width, gray level, character space, line space.
01593 Lcd.font.h = temp[2];
01594 Lcd.font.w = temp[3];
01595
01596 Lcd.chsp = temp[4];
01597 Lcd.lnsp = temp[5];
01598
01599 Lcd.font.gray = 3;
01600
01601 Lcd.pChbuf = &LCD_chBuf[0];
01602 }
|
|
|
Function sets up the display frame control.
Definition at line 1610 of file lcd.c. References st_LCD::frame. Referenced by MENU__createListMenu(), MENU__listMenuAction(), and MENU_statusBar(). 01611 {
01612 Lcd.frame = *frame;
01613 }
|
|
|
Function sets up the active LCD pen, if no pen is passed in, clear the LCD pen.
Definition at line 1555 of file lcd.c. References st_PEN::clr, st_LCD::pen, st_PEN::shp, and st_PEN::sz. Referenced by MENU__createDjMenu(), MENU__createMsgBox(), MENU__createShadow(), MENU__listMenuAction(), MENU__myfiChannelControl(), MENU__myfiGainControl(), MENU__playMenuAction(), MENU__sbarInit(), MENU__vbarInit(), MENU__volumeControl(), MENU__XIMaction(), MENU_create(), MENU_statusBar(), MENU_update(), and SYS_die(). 01556 {
01557 if(pen)
01558 {
01559 memcpy(&Lcd.pen, pen, sizeof(st_PEN));
01560 }
01561 else
01562 {
01563 /* If NULL pen, clear all parameters. */
01564 Lcd.pen.clr = 0;
01565 Lcd.pen.shp = 0;
01566 Lcd.pen.sz.x = 0;
01567 Lcd.pen.sz.y = 0;
01568 }
01569 }
|
|
|
Function updates the rectangle dispaly area to LCD.
Definition at line 403 of file lcd.c. 00404 {
00405 LCD_assertRect(*pRect, LCD_UPDATE);
00406
00407 if(SYS_NOTASSERTED())
00408 {
00409 mMSG_send( lcdMsgQ, LCD_MSG_ID,
00410 ((pRect->ul.x<<8)&0x0ff00)|pRect->ul.y,
00411 ((pRect->br.x<<8)&0x0ff00)|pRect->br.y,
00412 0);
00413 }
00414 }
|
|
||||||||||||
|
Function writes rectangle area display data into LCD image buffer. together with LCD_rdRect(...), application can directly manipulate the image buffer data. NOTE: this function does not do any frame boundary check.
Definition at line 102 of file lcd.c. References st_RECT::br, st_LCD::frame, LCD__wrRect(), st_RECT::ul, st_POINT::x, and st_POINT::y. Referenced by MENU__preserve(), MENU__restore(), and MENU_action(). 00103 {
00104 st_RECT frame;
00105
00106 LCD_assertRect(*pRect, LCD_WRRECT);
00107 LCD_assert( (unsigned int)pData, LCD_WRRECT2);
00108
00109 frame = Lcd.frame;
00110
00111 Lcd.frame.ul.x =
00112 Lcd.frame.ul.y = 0;
00113 Lcd.frame.br.x = LCD_XMAX;
00114 Lcd.frame.br.y = LCD_YMAX;
00115 LCD__wrRect(pRect, pData+1);
00116
00117 Lcd.frame = frame;
00118 }
|
Here is the call graph for this function:

1.3.9.1