📄 tft_sunplus_t112_auo_panel.h
字号:
#define T112
#define ENCSC 0x04
#define CPH1 0x00 // 0x02 for turning off CPH1
#define CPH2 0x00 // 0x04 for turning off CPH2
#define CPH3 0x00 // 0x08 for turning off CPH3
//panel.h
#define H_Size 480 //0xdc 0xdd //0xb4 0xb5 //0xdc 0xdd
#define V_Size 234 //0xde 0xdf //0xb6 0xb7 //0xde 0xdf
#define H_Size43 360
#define DFDIV_40 21//27 //40MHz 0xC8
#define DIDIV 2//3 //0xC9
#define DODIV 3//3 //0xCA
#define DWVSZ 234
#define DWHSZ 480
#define DWVSST 0x11 //0x0F
#define DISP_DFLT_HTOTAL 600
#define DISP_DFLT_VTOTAL 268
#define DISP_DFLT_HSWIDTH 16
#define DISP_DFLT_VSWIDTH 3
#define DISP_DFLT_HDENS 10
#define DISP_DFLT_VDENS 13
#define DISP_DFLT_HDS 10
#define DISP_DFLT_VDS 8
#define DISP_DFLT_HDENRES 480
#define DISP_DFLT_VDENRES 234
#define DISP_DFLT_HDRES 480
#define DISP_DFLT_VDRES 234
#define DRDIV (1<<(DODIV+1))
#define DNDIV_40 ((float)(DFDIV_40+2)/(DIDIV+2)/DRDIV)
typedef struct tagRegAdrVal
{
BYTE ucRegAdr;
BYTE ucRegVal;
}REGADRVAL;
REGADRVAL stInitT10xP0[]={
//adr , value
//#if (defined T100A)|(defined T102)
#ifdef T100
0x0A , 0x60, //ADC_ROFF // Change by Sherman 06'01'10
0x0B , 0x60, //ADC_GOFF // Change by Sherman 06'01'10
0x0C , 0x60, //ADC_BOFF // Change by Sherman 06'01'10
0x1A , 0x87, //ADC_AGC_SEL_REG
0xCA , DODIV, //PLLDIV_O
0xC2 , 0x12, //POUT_VSYNC_CTRL_REG
//for image quality
0x6C , 0x80, //OP_SAT_REG
0x60 , 0x00, //DCTI_BW_REG
0x61 , 0x88,//For char clear //LUMA_PKCTRL_REG
0x62 , 0x18,//For char clear //BP_PKCOEF_REG
0x63 , 0x0F,//For char clear //HP_PKCOEF_REG
0x64 , 0x04,//For char clear //60 //LP_PKCOEF_REG
0x66 , 0x88,//For color clear enable DCTI //DCTI_GAINCO_REG
0X1C , 0xF0, //BLANK_SYNCLV_REG
#else
0x00 , 0x00,
0x01 , 0x00,
0x02 , 0x00,
0x0A , 0x05, // Change by Sherman for Gamma Adjustment 05'12'19
0x0B , 0xA0, // Change by Sherman for Gamma Adjustment 05'12'19
0x0C , 0x60,
0x1a , 0xc7,
0xCA , DODIV,//0x10|DODIV, // Change by Sherman 06'01'18
0xc2 , 0x00,
//for image quality
0x60 , 0x81,
0x1c , 0x80,
0x61 , 0x8F,
0x62 , 0x0F,
0x63 , 0x0F,
0x64 , 0x04,
0x66 , 0x88,
#endif
0x97 , 0x95, //CSC_YCOEF_REG
0x98 , 0xCC, //CSC_CrRCOEF_REG
0x0D , 0x20, //5 //ADC_GENCTRL_REG
0xE0 , 0x92, //PW_MGRCTRL_REG
0x11 , 0x05, //YPbPr_CLPCTRL_REG
//Source Select--S Video
0x18 , 0x00, //ASRC_MUX_REG
0x19 , 0x07, //YCbCr_SW_REG
//Enable CSC
0x91 , 0x00, //BTIN_PATTERN_REG
//DSP Clock
#ifdef SEQ_MODE // For sequential mode, bruce, 2006/01/09
0xCB , (CPH1_PH | PHASE_DIV),
0xCC , (CPH3_PH | CPH2_PH),
0xC8 , DFDIV_S,
0xC9 , DIDIV_S,
0xCA , DODIV_S,
#else
0xC8 , DFDIV_40, //PLLDIV_F
0xC9 , DIDIV, //PLLDIV_I
#endif
//DSP Colck Polarity
0xC1 , 0xc8, //POUT_CTRL3_REG
//H&V Main Display Pixel Clock Setted
0xDC ,(H_Size&0xFF),//H Size //HMDISP_SIZE_L_REG
0xDD ,(H_Size>>8), //HMDISP_SIZE_H_REG
0xDE ,(V_Size&0xFF),//V Size //20 //VMDISP_SIZE_L_REG
0xDF ,(V_Size>>8), //VMDISP_SIZE_H_REG
//H&V Display Pixel Clock Setted
#ifdef _160_234
0xcb , 0x66,
0xcc , 0x42,
0x79 , 0x0d,
#endif
0xB0 , DISP_DFLT_HDENS, //H Start //DWHS_L_REG
0xB1 ,(DISP_DFLT_HDENS>>8), //DWHS_H_REG
0xB2 , DISP_DFLT_VDENS, //V Start //DWVS_L_REG
0xB3 ,(DISP_DFLT_VDENS>>8), //25 //DWVS_H_REG
0xB4 ,(H_Size&0xFF), //H Width //DWHSZ_L_REG
0xB5 ,(H_Size>>8), //DWHSZ_H_REG
0xB6 ,(V_Size&0xFF), //DWVSZ_L_REG
0xB7 ,(V_Size>>8), //DWVSZ_H_REG
0xB8 , DISP_DFLT_HTOTAL, //H Total //30 //PH_TOT_L_REG
0xB9 ,(DISP_DFLT_HTOTAL>>8), //PH_TOT_H_REG
0xBA , DISP_DFLT_VTOTAL, //V Total //PV_TOT_L_REG
0xBB ,(DISP_DFLT_VTOTAL>>8), //PV_TOT_H_REG
0xBC , DISP_DFLT_HSWIDTH, //HSYNC Width //PH_PW_L_REG
0xBD ,(DISP_DFLT_HSWIDTH>>8), //35 //PH_PW_H_REG
0xBE , DISP_DFLT_VSWIDTH, //VSYNC Width //PV_PW_L_REG
0xBF ,(DISP_DFLT_VSWIDTH>>8), //PV_PW_H_REG
//Scaling
0x72 , 0x33, //H Scale //SC_HOR_H1
0x73 , 0x73, //SC_HOR_H2
0x74 , 0x00, //V Scale //40 //SC_VER_V1
0x75 , 0x40, //SC_VER_V2
//LineBuffer Prefill
0xe2 , 0x11,
0x84 , 0x00, //LINE_BUF_L_REG
0x85 , 0x10, //LINE_BUF_H_REG
0xE1 , 0xa0, //OPIN_CFG_REG
0x50 , 0x10, //45 //VSYNC_TIME_MEA_REG
0x38 , 0x50, //HSYNC_MISSCNT_L_REG
0x39 , 0x00, //HSYNC_MISSCNT_H_REG
0x3A , 0x20, //VSYNC_DLT_REG
0x3B , 0x03, //HSYNC_DLT_REG
#ifdef TCON
0xE0 , (0x91 | CPH1 | CPH2 |CPH3), //PW_MGRCTRL_REG, Bruce, 2006/01/09 for flexibility
#ifdef T100
0xE1 , 0xf4, //OPIN_CFG_REG
#else
0xe1 , 0xe0,
#ifdef _160_234
0xe0 , 0xbf,
#endif
#endif
#else
0xE0 , (0x91 | CPH1 | CPH2 |CPH3), //PW_MGRCTRL_REG
0xE1 , 0x00, //OPIN_CFG_REG
#endif
0x9C , 0x02, //DITHERING
0x90 , 0x04,//0x04, //IMG_FUNCTRL_REG
//De-Interlace enable
0x30 , 0x00,//(I1CReadByte(TW101, 0x30)|0x01)//DITLC_VSHDW_REG
#ifdef OUT_PIN_CONF
0xE1 , OUT_PIN_CONF, //OPIN_CFG_REG
#endif
#ifdef Enable_HelfSample
#ifdef T100A
0x79 , 0x20,
#else
0x78 , 0xa3,
#endif
#endif
#ifdef EnableDither
0x90 , ENCSC | ENDITHER,
0x9c , OutputBit,
#else
0x90 , ENCSC,
#endif
#ifdef T112
0xea , 0x11,
0xe5 , 0x03,
0xe6 , 0x18,
#endif
0xff , 0x00// End of register settings, bruce, 2006/01/09
};
REGADRVAL stInitT10xP2[]={
//adr , value
0x3f , 0x00, //ADC_ROFF // Change by Sherman 06'01'10
0x24 , 0xe9, //0 //0x24
0x25 , 0x0F, //0x25
//Video Register Page Setted
0x2E , 0x82, //HACT_START_REG
0x2F , 0x30, //HACT_WIDTH_REG
0x3F , 0x00, //SOFT_RESET_REG
0xc0 , 0x14, //5 //0xc0
0xe0 , 0x10, //0xe0
0x0C , 0x8a, //CHROMA_AGC_REG
0x18 , 0x21, //CHROMA_DTO0_REG
0x19 , 0xf0, //CHROMA_DTO1_REG
0x1A , 0x7c, //10 //CHROMA_DTO2_REG
0x1B , 0x0f, //CHROMA_DTO3_REG
0x30 , 0x24, //VACT_START_REG
0x31 , 0x61, //VACT_HEIGHT_REG
0x82 , 0x42, //COMB_FILTERCFG_REG
0x04 , 0xD8, // Change by Sherman for Gamma Adjustment 05'12'19
0x10 , 0x27,
0x02 , 0x4B,
0x11 , 0xFF,
//Color
0x01 , 0x00,//(I1CReadByte(TW101+4, 0x01)|0x01), //BW_CTRL_REG
0x08 , 0x70, // Change by Sherman for Gamma Adjustment 05'12'19
0x09 , 0x28,
0x80 , 0x03,
0x2d , 0x48, // Add by Sherman 06'01'10s
0x3f , 0x01, //ADC_ROFF // Change by Sherman 06'01'10
0xff , 0x00, // End of register settings, bruce, 2006/01/09
};
#define TW101 0x50 // for compatibility
#define DEINTERLACE 0x02 // 0x00 to disable deinterlace, Bruce, 2006/01/10
unsigned char ucaPanelSpecAdrP0[]={ //
0x79, 0xc7, 0x65, 0x66
};
unsigned char ucaPanelSpecDataP0[]={ //
0x00, 0x00, 0x08, 0x88
};
unsigned char ucaPanelSpecAdrP2[]={ //
0x08, 0x09, 0x0a
};
unsigned char ucaPanelSpecDataP2[]={ //
//Constrast, Bright, Sat
0x50,0x26,0x76
};
/*BmpFileName = 4.bmp model= 1 12x18*/
const unsigned char font_30[]={ //Digital 0
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0xe0,0x61,0x60,0x63,
0x60,0x66,0x60,0x6c,0x60,0x78,0x60,0x70,0xe0,0x60,0xc0,0x3f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_31[]={ //Digital 1
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x0e,0x00,0x1e,0x00,0x06,0x00,0x06,
0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x80,0x1f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_32[]={ //Digital 2
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0f,0xc0,0x1f,0xe0,0x38,0x60,0x30,0xe0,0x00,
0xc0,0x01,0x80,0x03,0x00,0x07,0x00,0x0e,0x00,0x1c,0xe0,0x3f,0xe0,0x3f,0x00,0x00,0x00,0x00
};
const unsigned char font_33[]={ //Digital 3
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x60,0x00,
0xc0,0x03,0xc0,0x03,0x60,0x00,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_34[]={ //Digital 4
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x03,0xc0,0x07,0xc0,0x0e,0xc0,0x1c,0xc0,0x38,
0xc0,0x70,0xc0,0x60,0xc0,0x60,0xe0,0x7f,0xe0,0x7f,0xc0,0x00,0xc0,0x00,0x00,0x00,0x00,0x00
};
const unsigned char font_35[]={ //Digital 5
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0xe0,0x7f,0x00,0x60,0x00,0x60,0x80,0x7f,
0xc0,0x7f,0xe0,0x00,0x60,0x00,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_36[]={ //Digital 6
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x00,0x60,
0x80,0x6f,0xc0,0x7f,0xe0,0x70,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_37[]={ //Digital 7
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0xe0,0x7f,0xe0,0x00,0xc0,0x01,0x80,0x03,
0x00,0x07,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00
};
const unsigned char font_38[]={ //Digital 8
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0xc0,0x30,
0xc0,0x3f,0xe0,0x7f,0xe0,0x70,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_39[]={ //Digital 9
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0xe0,0x70,
0xe0,0x3f,0xe0,0x1f,0x60,0x00,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_41[]={ // A
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x06,
0x00,0x0f,
0x80,0x1f,
0xc0,0x39,
0xe0,0x70,
0x60,0x60,
0xe0,0x7f,
0xe0,0x7f,
0x60,0x60,
0x60,0x60,
0x60,0x60,
0x60,0x60,
0x00,0x00,
0x00,0x00
};
const unsigned char font_42[]={ // B
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7f,0xc0,0x7f,0xe0,0x30,0x60,0x30,0xc0,0x30,
0xc0,0x3f,0xe0,0x3f,0xe0,0x30,0x60,0x30,0xe0,0x30,0xc0,0x7f,0x80,0x7f,0x00,0x00,0x00,0x00
};
const unsigned char font_43[]={ // C
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x00,0x60,
0x00,0x60,0x00,0x60,0x00,0x60,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_44[]={ // D
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7f,0xc0,0x7f,0xe0,0x60,0x60,0x60,0x60,0x60,
0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x60,0xc0,0x7f,0x80,0x7f,0x00,0x00,0x00,0x00
};
const unsigned char font_45[]={ // E
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0xe0,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,
0xc0,0x7f,0xc0,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0xe0,0x7f,0xe0,0x7f,0x00,0x00,0x00,0x00
};
const unsigned char font_46[]={ // F
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0xe0,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,
0xc0,0x7f,0xc0,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00
};
const unsigned char font_47[]={ // G
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x00,0x60,
0xe0,0x63,0xe0,0x63,0x60,0x60,0xe0,0x60,0xe0,0x71,0xe0,0x3f,0x60,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_48[]={ // H
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00
};
const unsigned char font_49[]={ // I
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1f,0x80,0x1f,0x00,0x06,0x00,0x06,0x00,0x06,
0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x80,0x1f,0x80,0x1f,0x00,0x00,0x00,0x00
};
const unsigned char font_4A[]={ // J
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,0xe0,0x0f,0x80,0x01,0x80,0x01,0x80,0x01,
0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x61,0x80,0x73,0x00,0x3f,0x00,0x1e,0x00,0x00,0x00,0x00
};
const unsigned char font_4B[]={ // K
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x60,0xc0,0x61,0x80,0x63,0x00,0x67,0x00,0x6e,
0x00,0x7c,0x00,0x7c,0x00,0x6e,0x00,0x67,0x80,0x63,0xc0,0x61,0xc0,0x60,0x00,0x00,0x00,0x00
};
const unsigned char font_4C[]={ // L
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,
0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xe0,0x7f,0xe0,0x7f,0x00,0x00,0x00,0x00
};
const unsigned char font_4D[]={ // M
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x70,0xe0,0x79,0xe0,0x7f,0x60,0x6f,0x60,0x66,
0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00
};
const unsigned char font_4E[]={ // N
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -