OledString.h
资源名称:SDK_M5661.rar [点击查看]
上传用户:hjhsjcl
上传日期:2020-09-25
资源大小:11378k
文件大小:11k
源码类别:
压缩解压
开发平台:
C++ Builder
- /*==========================================================================
- Copyright (c) 2004 ALi Corporation. All Rights Reserved
- File: Lcd.h
- content:
- History: Created by David Chiu 2004/3/29
- ==========================================================================*/
- #ifdef _OLED_STRING_H_
- #define EXTERN
- #else
- #define EXTERN extern
- #endif
- #if(USE_SYS_STR_SCROLL)
- #define LCD_STR_END_COLUMN OLED_FLIST_END_COLUMN
- #define LCD_STR_START_COLUMN UI_FILST_STRING_START
- #define LCD_STR_WIDTH (OLED_FLIST_END_COLUMN-UI_FILST_STRING_START+1)
- #define LCD_STR_START_DELAY 20
- #define LCD_STR_NORMAL_DELAY 1
- #define LCD_STR_END_DELAY 20
- #endif
- // WHH #13 301_070106
- //-----------------------------------------------
- // USE_LYRIC_TWO_LINE: 1: Display Lyric 2 line and no scrolling
- // 0: Display Lyric 1 line and scrolling
- //-----------------------------------------------
- #define USE_LYRIC_TWO_LINE 0
- //-----------------------------------------------
- // Support Unicode Start Code
- // If your unicode font start at 0x3000(It's default), you should set 0x30
- //
- // We usally use 0x30 for most east font or 0x01 for all unicode,
- // in those case, you only need to change UNICODE_USE_ALL in TypeDef.h
- //-----------------------------------------------
- #if(UNICODE_USE_ALL)
- #define UNICODE_START_CODE 0x00 //Tne050312#1
- #else
- #define UNICODE_START_CODE 0x30
- #endif
- #define LCD_DEFAULT_RATIO 4
- #define LCD_DEFAULT_CONTRAST 0x02 //Walace060204#Bright for brightness useage,
- //#define LCD_DEFAULT_CONTRAST 63 //Walace060204#Bright
- //#define LCD_DEFAULT_CONTRAST 32 //Walace051130#2
- //2 ===== Backlight =========================================
- #define LCD_BACKLIGHT_DEFAULT 15
- #define LCD_BACKLIGHT_MIN 14 // ASCII 0 , BackLight Always Off
- //#define LCD_BACKLIGHT_MIN '3' // ASCII 0 , BackLight Always Off //Walace051229#4
- #define LCD_BACKLIGHT_MAX 61 // ASCII : , BackLight Always On
- #define LCD_BACKLIGHT_DEFAULT_NUM LCD_BACKLIGHT_DEFAULT
- #define LCD_BACKLIGHT_MIN_NUM LCD_BACKLIGHT_MIN
- #define LCD_BACKLIGHT_MAX_NUM LCD_BACKLIGHT_MAX
- //#define LCD_BACKLIGHT_DEFAULT LCD_BACKLIGHT_MIN //Walace051229#4
- //tne 2005/08/08
- //Lcd Copy Page Sector Define(0874, 1250-1258)
- #define LCD_CP_0874_SECTOR 0
- #define LCD_CP_1250_SECTOR 1
- #define LCD_CP_1251_SECTOR 2
- #define LCD_CP_1252_SECTOR 3
- #define LCD_CP_1253_SECTOR 4
- #define LCD_CP_1254_SECTOR 5
- #define LCD_CP_1255_SECTOR 6
- #define LCD_CP_1256_SECTOR 7
- #define LCD_CP_1257_SECTOR 8
- #define LCD_CP_1258_SECTOR 9
- #define LCD_SCROLL_WIDTH 2 //How many pixle scrolled every time(only support 1,2,4,8)
- //2 ============ Tag ==========================================
- // WHH #13 301_070105
- #define OLED_TAG_ROW 30
- #define OLED_TAG_COL (34-8)
- #define OLED_TAG_HEIGHT LINE1
- #define OLED_TAG_END_COLUMN (121)
- #define LCD_TAG_START_DELAY 30 //tne 2005/11/24 #1
- #define LCD_TAG_NORMAL_DELAY 1
- #define LCD_TAG_END_DELAY 30
- //2 ============ Lyric ======================================
- #define OLED_LYRIC_ROW 48
- #define OLED_LYRIC_COL (34-8)
- #define OLED_LYRIC_HEIGHT LINE1
- #define OLED_LYRIC_END_COLUMN (121)
- #if(USE_LYRIC_TWO_LINE)
- #define LCD_LYRIC_START_DELAY 36
- #define LCD_LYRIC_NORMAL_DELAY 18
- #else
- #define LCD_LYRIC_START_DELAY 9
- #define LCD_LYRIC_NORMAL_DELAY 0
- #endif
- //2 ============ File List =====================================
- #define OLED_FLIST_COL WORD1
- #define OLED_FLIST_HEIGHT LINE1
- // WHH #8 301_061226
- //#define OLED_FLIST_END_COLUMN MAX_COLNUM
- #define OLED_FLIST_END_COLUMN MAX_COLNUM-14
- #define LCD_FLIST_START_DELAY 29
- #define LCD_FLIST_NORMAL_DELAY 2
- #define LCD_FLIST_END_DELAY 28
- //============ Sub Menu ===============================
- #define ITEM_START_COL 33
- #define ITEM_START_ROW 48
- #define ITEM_ROW_OFF 20
- #define ITEM_NUM_OPAGE 5
- #define ITEM_SUB_NUM_OPAGE 4
- #define ITEM_COL_WIDTH 168
- #define ITEM_ICON_START_COL 10
- #define ITEM_SEL_START_COL 26
- //============ Subtitle status Define ===========
- // use by gxbLcdTagStatus, gxbLcdLyricStatus
- #define NO_SUBTITLE 0x00 //Default status,not load subtitle yet or no subtitle
- #define SHORT_SUBTITLE 0x10 //Short subtitle less than 16 words
- #define LONG_SUBTITLE 0x20 //Long subtitle more than 16 words
- //tne 512 tag start
- //============== Lcd Tag Turn Define ============
- // use by gxbLcdTagStatus, gxbLcdLyricStatus //Modified by tne 512 tag
- #define LCD_TAG_TURN_TITLE 0x00 //Showing MP3 TAG Title
- #define LCD_TAG_TURN_ARTIST 0x01 //Showing MP3 Artist
- #define LCD_TAG_TURN_ALBUM 0x02 //Showing MP3 ALBUM
- //#define LCD_TAG_TURN_GENRE 0x03 //Showing MP3 Genre
- #define LCD_TAG_TOTAL_NUMBER 3 //Walace061102#1
- #define LCD_TAG_TURN_FILEONLY 0x03 //0x04 //No MP3 TAG,Only show File name
- #define LCD_TAG_TURN_DEFAULT LCD_TAG_TURN_ALBUM //Default status,for change new song,MP3 Tag exist unkonw
- //tne 512 tag end
- //========== Lcd Lyric Scroll Done Flag =========
- // use by gxbLcdLyricStatus
- #define LCD_LYRIC_SCROLL_DONE 0x02
- #define LCD_LYRIC_SCROLLING 0x00
- //WHH #13 301_070106
- #define LCD_LYRIC_CHANGE_LINE 0x01
- //============== Get Lcd Tag status =============
- #define GET_LCD_TAG_HALFWORD() (gxbLcdTagStatus&0x01)
- #define GET_LCD_TAG_TURN() (gxbLcdTagStatus&0x0E)
- #define GET_LCD_TAG_SUBTITLE() (gxbLcdTagStatus&0xF0)
- //============= Get Lcd Lyric status ============
- #define GET_LCD_LYRIC_HALFWORD() (gxbLcdLyricStatus&0x01)
- #define GET_LCD_LYRIC_SUBTITLE() (gxbLcdLyricStatus&0xF0)
- //================ Lcd Show String Return ===============
- //See LcdShowString Function
- #define FULL_WORD 0
- #define HALF_WORD 1
- //=========== Big Font and Small Font ===========
- #define LCD_BIG_FONT_WIDTH 16 //Display Big Font Width ... Chinese, Japanes, Koera ...
- #define LCD_SMALL_FONT_WIDTH 8 //Display Small Font Width ... English
- //Backlight Define
- //Lyric & Tag hidden flag
- #define LCD_TAG_DISPLAY 0
- #define LCD_TAG_HIDDEN 1
- //tne 2005/08/08
- //Lcd Code Page Sector Define(0874, 1250-1258)
- #define LCD_CP_0874_SECTOR 0
- #define LCD_CP_1250_SECTOR 1
- #define LCD_CP_1251_SECTOR 2
- #define LCD_CP_1252_SECTOR 3
- #define LCD_CP_1253_SECTOR 4
- #define LCD_CP_1254_SECTOR 5
- #define LCD_CP_1255_SECTOR 6
- #define LCD_CP_1256_SECTOR 7
- #define LCD_CP_1257_SECTOR 8
- #define LCD_CP_1258_SECTOR 9
- #define LCD_AUTO_CENTER_COL 0xFF // In LcdShowSysString, auto center string
- //Walace060918#1 start //vicky061107#1 update return type
- #if(_PM_FM_|_PM_PHOTO_|_PM_VD_MENU_)
- EXTERN API WORD StrShowString(PBYTE pbShowStr,BYTE bColStart,BYTE bRowStart,BYTE bStrLen) large;
- EXTERN API BYTE StrShowSysString(WORD wSysStrNum,BYTE bColStart,BYTE bRowStart) large;
- #else
- EXTERN API WORD StrShowString(PBYTE pbShowStr,BYTE bColStart,BYTE bRowStart,BYTE bStrLen) ;
- EXTERN API BYTE StrShowSysString(WORD wSysStrNum,BYTE bColStart,BYTE bRowStart) ;
- #endif
- //Walace060918#1 end
- #if(USE_SYS_STR_SCROLL)
- EXTERN void OLedScrollSysString(void) large;
- EXTERN void SysStringScroll(void);
- #endif
- EXTERN API void StrShowInitLowPower(void);
- /* //Walace061228#CodeSize
- EXTERN API void LcdShowTagTitle() large;
- EXTERN API void LcdScrollTag() large;
- EXTERN API void LcdShowLyrics() large;
- EXTERN API void LcdScrollLyric() large;
- EXTERN API void LcdSetLyricDone() large;
- */
- EXTERN API void LcdShowTagTitle() ;
- EXTERN API void LcdScrollTag() ;
- EXTERN API void LcdShowLyrics() ;
- EXTERN API void LcdScrollLyric() ;
- EXTERN API void LcdSetLyricDone() ;
- #if(_PM_FLIST_|_PM_SYS_|_PM_PHOTO_|_PM_VIDEO_) //tne 2005/11/25 #2
- EXTERN API void LcdShowFileList(struct FILE_INF_DATA xdata * pFileStruct,BYTE bPage) large;
- #else
- EXTERN API void LcdShowFileList(PBYTE pbFileName,BYTE bPage,BYTE bStartWord) large;
- #endif
- #if(_PM_FLIST_|_PM_PHOTO_|_PM_SYS_|_PM_VIDEO_)
- EXTERN API BOOL LcdScrollFileList(struct FILE_INF_DATA xdata * pFileStruct, BYTE bPage,BOOL fReverse) large;
- #else //#if(_PM_CLIST_|_PM_HST_|)
- EXTERN API BOOL LcdScrollFileList(PBYTE pbFileName, BYTE bPage,BOOL fReverse) large;
- #endif
- API void LcdShowClassList(PBYTE pbClassName,BYTE bPage) large;
- #if(_PM_PHOTO_|_PM_VIDEO_|_PM_PLAY_|_PM_SYS_|_PM_HST_) //050803: host
- // gxbLcdTagStatus, gxbLcdLyricStatus:
- // 7 6 5 4 3 2 1 0
- // | | | | | | | |
- // | | | | | | | LcdShowString FULL or HALF word
- // | | | |(- - -)Showing TAG
- // (- - - -)SubTitle Status
- //
- // bit 0: LcdShowString - FULL_WORD(0) or HALF_WORD(1)
- // bit 1-3: show which TAG, see Lcd Tag Turn
- // bit 4-7: see Lcd Subtitle Status
- EXTERN XBYTE gxbLcdTagStatus;
- // gxbLcdLyricStatus:
- // 7 6 5 4 3 2 1 0
- // | | | | | | | |
- // | | | | | | | LcdShowString FULL or HALF word
- // | | | | | | Lyric Scroll Done Flag
- // | | | |(- -)reserved
- // (- - - -)SubTitle Status
- //
- // bit 0: LcdShowString - FULL_WORD(0) or HALF_WORD(1)
- // bit 1: Lyric Scroll Done
- // bit 2-3: reserve
- // bit 4-7: see Lcd Subtitle Status
- #if(_PM_PLAY_)
- //EXTERN XBYTE gxbLcdLyricStatus;
- #endif
- // gxbLcdTagScrollPix,gxbLcdLyricScrollPix:
- // if scrolling... it is the scrolling pixel
- EXTERN XBYTE gxbLcdTagScrollPix;
- EXTERN XBYTE gxbLcdLyricScrollPix;
- //tne 2005/08/11 //Adjust scroll offset
- EXTERN XBYTE gxbLcdScrollOffset;
- // gxwShowTagPoint, gxbShowLyricPoint:
- // point to show word
- // EX: gxbTagTitle+gxwShowTagPoint is that word
- //EXTERN XBYTE gxwShowTagPoint;
- EXTERN XWORD gxwShowTagPoint; //tne 512 tag //vicky061107#1
- #if(!_PM_SYS_)
- EXTERN XBYTE gxbShowLyricPoint;
- #endif
- // point to Tag which is showing now
- EXTERN xdata PXBYTE gxbShowTagBase; //Walace061211#1
- // More delay for scrolling subtitle
- EXTERN XBYTE gxbTagScrollDelay;
- #if(!_PM_SYS_)
- EXTERN XBYTE gxbLyricScrollDelay;
- #endif
- EXTERN BOOL gfScrollFlag; //Walace060213#3
- #endif
- #if(USE_SYS_STR_SCROLL)
- EXTERN XBYTE gxbSysStringScrollDelay;
- #endif
- // If string use unicode
- EXTERN XBYTE gxfSourceUnicode;
- //tne lcd scroll2
- // Lcd Display limit column
- EXTERN XBYTE gxbLcdLimitCol;
- // If display over the limit column, how many pixels have shown
- EXTERN XBYTE gxbLcdDispLimPix;
- // After calling LcdShowString, the last display pixel
- EXTERN XBYTE gxbLcdLastStrPix;
- EXTERN BOOL LcdChkCjkCutWord(PBYTE pbString, BYTE bLen); //tne 2006/02/24
- EXTERN API void LcdShowDirName(void) large;
- // Turn Big5->Unicode Table index
- //EXTERN XWORD gxwBig5UniTable;
- //EXTERN XWORD gxwUniBig5Table;
- //tne 2005/08/08 //Only keep current transfer table index
- /*
- #define gxwBig5UniTable gxwFontTable[FONT_BIG2UNI]
- #define gxwUniBig5Table gxwFontTable[FONT_UNI2BIG]
- #define gxwGbUniTable gxwFontTable[FONT_GB2UNI]
- */
- //-----------------------------------------------
- // USE_ONLY_STD_FONT 0: When use Big5, include user font area(other characters)
- // 1: When use Big5, only use stdand font(5401 characters or 13051 characters)
- // This define is for old font system. It recommend to set 1
- //-----------------------------------------------
- #define USE_ONLY_STD_FONT 1
- //Walace051119 #1
- /*
- #define CB_NUMBER_ROW ICON_DIGIT68_H
- #define CB_NUMBER_COL ICON_DIGIT68_W
- */
- #define ICON_NUMBER_ROW ICON_DIGIT68_H
- #define ICON_NUMBER_COL ICON_DIGIT68_W
- #undef EXTERN