?? drvlcd_driver.cqm.c
字號:
//*******************************************************//
// PHILIPS Lcd Driver PCF8833 V0.1 //
// copyright By BenQ SuZhou //
// Joseph m chen 7/2004 any question contact me //
// Mail : Joseph.m.chen@benq.com //
//*******************************************************//
#define color16bit
//#define arimalcd
#define Nanyalcd
//#define color12bit
#include <string.h>
#include <math.h>
#include "common.h"
#include "drvLcd.h"
#include "drvNvdata.h"
#include "fmApp_main.h"
#include "GpioDriver.h"
#include "fmMp3.h"
#include "PSA_API.h"
#include "fmI2cmaster.h"
#include "PmuDrv.h"
#include "PicReserve.h"
#include "fmMenu_Globals.h"
#include "fmPicBrowser.h"
#include "fmBattery.h"
#define PI 3.1415926
#define LCD_CONTRAST_MAX_VALUE 20
#define LCD_CONTRAST_MIN_VALUE 0x00
#define LCD_BASE 0x8E000000 /* base address for SAA7750 LCD interface */
#define LCD_PAGEADDR_SET 0xB0 //PageAddr
#define LCD_COLADDR_HI 0x10 //ColAddrHi
#define LCD_COLADDR_LO 0x00 //ColAddrLo
#define LCD_STATUS ( ( volatile U32 * ) ( LCD_BASE + 0x00) )
#define LCD_CONTROL ( ( volatile U32 * ) ( LCD_BASE + 0x04) )
#define LCD_INT_RAW ( ( volatile U32 * ) ( LCD_BASE + 0x08) )
#define LCD_INT_CLEAR ( ( volatile U32 * ) ( LCD_BASE + 0x0C) )
#define LCD_INT_MASK ( ( volatile U32 * ) ( LCD_BASE + 0x10) )
#define LCD_READ_CMD ( ( volatile U32 * ) ( LCD_BASE + 0x14) )
#define LCD_INST_BYTE ( ( volatile U32 * ) ( LCD_BASE + 0x20) )
#define LCD_DATA_BYTE ( ( volatile U32 * ) ( LCD_BASE + 0x30) )
#define LCD_INST_WORD ( ( volatile U32 * ) ( LCD_BASE + 0x40) )
#define LCD_DATA_WORK ( ( volatile U32 * ) ( LCD_BASE + 0x80) )
/*************************************************************************
* STATICS
*************************************************************************/
/* Static variables */
static int timeoutchk;
static U8 ShiftiCount = 0;
static U8 gDisplayLeftDistance=0; //記錄文件名滾動時最左距離左邊界的位置
static U8 ShiftloopCount =0;
extern fmAPP_Nvdata_t gfmAPP_Nvdata_Local;
extern U8 WordColor;
#if 1
/*****ldm add*****/
#define ENGLISH_CHARACTER 1
#define CHINESE_CHARACTER 2
#define STRING_LENGTH_LIMIT 15
#define STRING_BLANK_LENGTH 24
DisplayState_e gDisplayState;
static U8 gfmBlinkSwitch,gBlink_on,gfmPage,gfmColumn;
static U16 gShift_i,gShift_j;
static U8 gReverse,gDisplayStyle,gEngCharNum;
static U8 gpString[256];
U8 gNameChange,gShift_on;
extern U8 RecordClearScreen;
extern APP_ModuleName_e gfmAPPMainModule;
extern char number0to9[264];//leo add
extern Bool BATFirstRead;
extern U8 NoClearRemain;
extern Bool cFlag;
extern U16 BatteryValtage;
extern Bool chargeflag;
extern U8 PhotoFullScreen;
extern Bool EnterSlideShow;
extern fmPicBrowserState gfmPicBrowserState;
extern S8 s8LockedState;
extern S8 s8BacklightOn;
extern U32 u16BacklightDelay;
#ifdef DeepBlue
U32 RecordTitle[7]={Title_Rec_deep,Title_Rec_SC,Title_Rec_TC,Title_Rec_J,Title_Rec_F,Title_Rec_S,Title_Rec_P};
U32 PhotoTitle[7]={Title_Photo_deep,Title_Photo_SC,Title_Photo_TC,Title_Photo_J,Title_Photo_F,Title_Photo_S,Title_Photo_P};
U32 ClockTitle[7]={Title_Clock_deep,Title_Clock_SC,Title_Clock_TC,Title_Clock_J,Title_Clock_F,Title_Clock_S,Title_Clock_P};
U32 SetupTitle[7]={Title_Setup_deep,Title_Setup_SC,Title_Setup_TC,Title_Setup_J,Title_Setup_F,Title_Setup_S,Title_Setup_P};
#endif
/*****ldm add end*****/
#endif
//extern const unsigned char gImage_mypic[];
//extern const unsigned char folder[];
//const unsigned char TitalBar[];
//const unsigned char pictureicon[];
//********cqm driver pcf8833***************//
int frameystart=0;
int pixelcount=0;
int displaytimes=0;
int cont;
int picdisplayover=1;
int rowcount=0;
char tempchar;
int picfilehandle;//
//*********pcf8833 end*********************//
/* Static functions */
static int LcdDrv_HalfFullChk(void);
extern Bool noshowlockicon;
void SingleCmd(unsigned char i);
void SingleData(unsigned char i);
#if 0
const U8 kCharBMPTable[][16]=
{
//16X8 bit map (digital0)
0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,
//16X8 bit map (digital1)
0x00,0x00,0x00,0x18,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,
//16X8 bit map (digital2)
0x00,0x00,0x00,0x3C,0x66,0x66,0x06,0x0C,0x18,0x30,0x60,0x60,0x7E,0x00,0x00,0x00,
//16X8 bit map (digital3)
0x00,0x00,0x00,0x3C,0x66,0x06,0x06,0x1C,0x06,0x06,0x06,0x66,0x3C,0x00,0x00,0x00,
//16X8 bit map (digital4)
0x00,0x00,0x00,0x06,0x0E,0x1E,0x1E,0x36,0x36,0x66,0x7E,0x06,0x06,0x00,0x00,0x00,
//16X8 bit map (digital5)
0x00,0x00,0x00,0x7E,0x60,0x60,0x60,0x7C,0x66,0x06,0x06,0x66,0x3C,0x00,0x00,0x00,
//16X8 bit map (digital6)
0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,
//16X8 bit map (digital7)
0x00,0x00,0x00,0x7E,0x06,0x0C,0x0C,0x18,0x18,0x18,0x30,0x30,0x30,0x00,0x00,0x00,
//16X8 bit map (digital8)
0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x3C,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,
//16X8 bit map (digital9)
0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3E,0x06,0x06,0x66,0x3C,0x00,0x00,0x00,
//16X8 bit map (two dot==10)
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,
//16X8 bit map (dash==11)
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//=======================================================================================//
//=======================================================================================//
/*-- 文字: --*///(SPACE空白)
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*-- 文字: A --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x10,0x10,0x18,0x28,0x28,0x24,0x3C,0x44,0x42,0x42,0xE7,0x00,0x00,
/*-- 文字: B --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xF8,0x44,0x44,0x44,0x78,0x44,0x42,0x42,0x42,0x44,0xF8,0x00,0x00,
/*-- 文字: C --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x3E,0x42,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x44,0x38,0x00,0x00,
/*-- 文字: D --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xF8,0x44,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x44,0xF8,0x00,0x00,
/*-- 文字: E --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xFC,0x42,0x48,0x48,0x78,0x48,0x48,0x40,0x42,0x42,0xFC,0x00,0x00,
/*-- 文字: F --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xFC,0x42,0x48,0x48,0x78,0x48,0x48,0x40,0x40,0x40,0xE0,0x00,0x00,
/*-- 文字: G --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x3C,0x44,0x44,0x80,0x80,0x80,0x8E,0x84,0x44,0x44,0x38,0x00,0x00,
/*-- 文字: H --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xE7,0x42,0x42,0x42,0x42,0x7E,0x42,0x42,0x42,0x42,0xE7,0x00,0x00,
/*-- 文字: I --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,
/*-- 文字: J --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x3E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x88,0xF0,
/*-- 文字: K --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xEE,0x44,0x48,0x50,0x70,0x50,0x48,0x48,0x44,0x44,0xEE,0x00,0x00,
/*-- 文字: L --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x42,0xFE,0x00,0x00,
/*-- 文字: M --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xEE,0x6C,0x6C,0x6C,0x6C,0x54,0x54,0x54,0x54,0x54,0xD6,0x00,0x00,
/*-- 文字: N --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xC7,0x62,0x62,0x52,0x52,0x4A,0x4A,0x4A,0x46,0x46,0xE2,0x00,0x00,
/*-- 文字: O --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38,0x00,0x00,
/*-- 文字: P --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xFC,0x42,0x42,0x42,0x42,0x7C,0x40,0x40,0x40,0x40,0xE0,0x00,0x00,
/*-- 文字: Q --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x82,0xB2,0xCA,0x4C,0x38,0x06,0x00,
/*-- 文字: R --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xFC,0x42,0x42,0x42,0x7C,0x48,0x48,0x44,0x44,0x42,0xE3,0x00,0x00,
/*-- 文字: S --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x3E,0x42,0x42,0x40,0x20,0x18,0x04,0x02,0x42,0x42,0x7C,0x00,0x00,
/*-- 文字: T --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xFE,0x92,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00,
/*-- 文字: U --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xE7,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,
/*-- 文字: V --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xE7,0x42,0x42,0x44,0x24,0x24,0x28,0x28,0x18,0x10,0x10,0x00,0x00,
/*-- 文字: W --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xD6,0x92,0x92,0x92,0x92,0xAA,0xAA,0x6C,0x44,0x44,0x44,0x00,0x00,
/*-- 文字: X --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xE7,0x42,0x24,0x24,0x18,0x18,0x18,0x24,0x24,0x42,0xE7,0x00,0x00,
/*-- 文字: Y --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xEE,0x44,0x44,0x28,0x28,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00,
/*-- 文字: Z --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x7E,0x84,0x04,0x08,0x08,0x10,0x20,0x20,0x42,0x42,0xFC,0x00,0x00,
/*-- 文字: a --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x1E,0x22,0x42,0x42,0x3F,0x00,0x00,
/*-- 文字: b --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xC0,0x40,0x40,0x40,0x58,0x64,0x42,0x42,0x42,0x64,0x58,0x00,0x00,
/*-- 文字: c --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x22,0x40,0x40,0x40,0x22,0x1C,0x00,0x00,
/*-- 文字: d --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x06,0x02,0x02,0x02,0x1E,0x22,0x42,0x42,0x42,0x26,0x1B,0x00,0x00,
/*-- 文字: e --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x7E,0x40,0x40,0x42,0x3C,0x00,0x00,
/*-- 文字: f --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x0F,0x11,0x10,0x10,0x7E,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,
/*-- 文字: g --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x44,0x44,0x38,0x40,0x3C,0x42,0x42,0x3C,
/*-- 文字: h --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xC0,0x40,0x40,0x40,0x5C,0x62,0x42,0x42,0x42,0x42,0xE7,0x00,0x00,
/*-- 文字: i --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,
/*-- 文字: j --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x44,0x78,
/*-- 文字: k --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xC0,0x40,0x40,0x40,0x4E,0x48,0x50,0x68,0x48,0x44,0xEE,0x00,0x00,
/*-- 文字: l --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,
/*-- 文字: m --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x49,0x49,0x49,0x49,0x49,0xED,0x00,0x00,
/*-- 文字: n --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDC,0x62,0x42,0x42,0x42,0x42,0xE7,0x00,0x00,
/*-- 文字: o --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,
/*-- 文字: p --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD8,0x64,0x42,0x42,0x42,0x44,0x78,0x40,0xE0,
/*-- 文字: q --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x22,0x42,0x42,0x42,0x22,0x1E,0x02,0x07,
/*-- 文字: r --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEE,0x32,0x20,0x20,0x20,0x20,0xF8,0x00,0x00,
/*-- 文字: s --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x42,0x40,0x3C,0x02,0x42,0x7C,0x00,0x00,
/*-- 文字: t --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x7C,0x10,0x10,0x10,0x10,0x10,0x0C,0x00,0x00,
/*-- 文字: u --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0x42,0x42,0x42,0x42,0x46,0x3B,0x00,0x00,
/*-- 文字: v --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE7,0x42,0x24,0x24,0x28,0x10,0x10,0x00,0x00,
/*-- 文字: w --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD7,0x92,0x92,0xAA,0xAA,0x44,0x44,0x00,0x00,
/*-- 文字: x --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6E,0x24,0x18,0x18,0x18,0x24,0x76,0x00,0x00,
/*-- 文字: y --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE7,0x42,0x24,0x24,0x28,0x18,0x10,0x10,0xE0,
/*-- 文字: z --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x44,0x08,0x10,0x10,0x22,0x7E,0x00,0x00,
/*-- 文字: . --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00,0x00,
/*-- 文字: ? --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,
/*-- 文字: ! --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x18,0x18,0x00,0x00,
/*-- 文字: % --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x44,0xA4,0xA8,0xA8,0xA8,0x54,0x1A,0x2A,0x2A,0x2A,0x44,0x00,0x00,
/*-- 文字: , --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x20,0xC0,
/*-- 文字: ' --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x60,0x60,0x20,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*-- 文字: ; --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x20,
/*-- 文字: " --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x12,0x36,0x24,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*-- 文字: / --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x01,0x02,0x02,0x04,0x04,0x08,0x08,0x10,0x10,0x20,0x20,0x40,0x40,0x00,
/*-- 文字: > --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x60,0x70,0x38,0x1C,0x0E,0x07,0x0E,0x1C,0x38,0x70,0x60,0x00,0x00,
0x00,0x00,0x00,0x60,0x70,0x38,0x1C,0x0E,0x07,0x0E,0x1C,0x38,0x70,0x60,0x00,0x00,
/*-- 文字: _ --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
/*-- 文字: ( --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x02,0x04,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x08,0x08,0x04,0x02,0x00,
/*-- 文字: ) --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x40,0x20,0x10,0x10,0x08,0x08,0x08,0x08,0x08,0x08,0x10,0x10,0x20,0x40,0x00,
/*-- 文字: + --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0xFE,0x10,0x10,0x10,0x10,0x00,0x00,0x00,
/*-- 文字: = --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00
};
#endif
//const U8 LockIcon[]={
/*-- 寬度x高度=16x16 --*/
//0x00,0x00,0x00,0x00,0x03,0xC0,0x04,0x20,0x08,0x10,0x08,0x10,0x3F,0xFC,0x20,0x04,
//0x2F,0xF4,0x28,0x14,0x2C,0x34,0x2E,0x74,0x2F,0xF4,0x20,0x04,0x3F,0xFC,0x00,0x00,
//};
static int LcdDrv_HalfFullChk()
{
volatile unsigned long halffull;
volatile int timeout;
halffull = 1;
timeout = 0;
while (halffull && (timeout++ < 0x0000003) && (timeoutchk == 0))
{
halffull = ~(*LCD_INT_RAW) & 0x00000002;
}
if ((timeout < 0x0000003) && (timeoutchk == 0))
{
return (0);
}
else
{
timeoutchk = 1;
return (1);
}
}
/*static void SetContrast (unsigned char Gain, unsigned char Step);
*/
/*************************************************************************
* Function : LcdDrv_Initialise
* Description : Initialize the LCD. Call this function once
* before using any of the LCD driver functions.
* After LcdDrv_Initialise, LCD display is ON & cleared.
* input parameters : lcdcontrol: the control bits to configure the LCD
* interface into various modes of parallel/serial,
* 8080/6800, 8bit/4bit, wait states, busy check,
* chip select, E_RD output pin, MSB_FIRST, loopback.
* See the SAA7750 manual for more information.
* return parameter : Returns value zero if all data successfully written
* to FIFO, otherwise, returns value one.
*
*************************************************************************/
static int LcdDrv_Initialise( int iContCtrlRegValue)
{
unsigned long lcdcontrolreg;
timeoutchk = 0;
lcdcontrolreg = 0x0; /* clear lcdcontrolreg to zero first */
/* configuration of the SSA LCD controller */
/* refer to SSA manual or LcdDrv.c rev 1.4 or smaller */
lcdcontrolreg = lcdcontrolreg | 0x00000001; /* RESERVE 1 */
lcdcontrolreg = lcdcontrolreg & 0xFFFFFFFD; /* PARALLEL */
lcdcontrolreg = lcdcontrolreg & 0xFFFFFFFB; /* INTEL */
lcdcontrolreg = lcdcontrolreg & 0xFFFFFFF7; /* BITMODE 8 */
lcdcontrolreg = lcdcontrolreg | 0x000000F0; /* WAITSTATE 15 */
lcdcontrolreg = lcdcontrolreg & 0xFFFFFEFF; /* BUSYFLAGDISABLE */
lcdcontrolreg = lcdcontrolreg & 0xFFFFFDFF; /* BUSYVAL0 */
lcdcontrolreg = lcdcontrolreg & 0xFFFFE3FF; /* BUSYBIT0 */
lcdcontrolreg = lcdcontrolreg & 0xFFFFDFFF; /* BUSYRS0 */
lcdcontrolreg = lcdcontrolreg | 0x00004000; /* CHIPSELECT1 */
lcdcontrolreg = lcdcontrolreg & 0xFFFF7FFF; /* ENRD0 */
lcdcontrolreg = lcdcontrolreg & 0xFFFEFFFF; /* TXFIRST0 */
lcdcontrolreg = lcdcontrolreg & 0xFFFDFFFF; /* LOOPBACKNO */
if (LcdDrv_HalfFullChk() == 0)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -