⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _saa7105.c

📁 DM642的VP口驱动
💻 C
📖 第 1 页 / 共 2 页
字号:
/*
 *  Copyright 2003 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) DDK 1.10.00.23 07-02-03 (ddk-b12)" */
/********************************************************************/
/* _saa7105.c file                                                      */
/********************************************************************/
#include "_saa7105.h"
 
_SAA7105_HDSyncGen _SAA7105_hdSyncGen0 =  
{
/* Line Count  */
    0,
    {{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
    {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
/* Line Type   */
    0,
    {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}},
/* Line Pattern */
    0,
    {{0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0}},
/* Sync Value */
    0,
    {{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
    {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}
};

_SAA7105_HDSyncGen _SAA7105_hdSyncGen480P =  
{
// Line Count
    0,
    {{6,0,1},{30,0,2},{483,0,3},{6,0,2},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
    {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
// Line Type
    0,
    {{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}},
// Line Pattern
    0,
    {{62,0,0,731,0,0,62,0,1,0,0,0},{62,0,2,731,0,3,62,0,3,0,0,0},
    {62,0,2,58,0,4,719,0,5,15,0,4},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0}},
// Sync Value
    0,
    {{0x80,1,1,0},{0xD4,0,1,0},{0x80,1,0,0},{0xD4,0,0,0},{0xD4,0,0,0},
    {0xD6,0,0,0},{0,0,0,0},{0,0,0,0}}
};

_SAA7105_HDSyncGen _SAA7105_hdSyncGen720P =  
{
// Line Count
    0,
    {{5,0,1},{20,0,2},{720,0,3},{5,0,2},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
    {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
// Line Type
    0,
    {{1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0},{3,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {5,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}},
// Line Pattern
    0,
    {{39,0,0,219,0,1,639,0,2,639,0,2},{54,0,1,54,0,2,0,0,0,0,0,0},
    {39,0,3,499,0,4,499,0,4,569,0,4},{39,0,5,0,0,0,0,0,0,0,0,0},
    {39,0,3,219,0,4,639,0,6,639,0,6},{69,0,4,39,0,5,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0}},
// Sync Value
    0,
    {{0x10,1,1,0},{0xD4,0,1,0},{0x80,0,1,0},{0x10,1,0,0},{0xD4,0,0,0},
    {0x80,0,0,0},{0xD6,0,0,0},{0,0,0,0}}
};

_SAA7105_HDSyncGen _SAA7105_hdSyncGen1080I =  
{
// Line Count
    0,
    {{10,0,1},{2,0,2},{14,0,3},{540,0,3},{2,0,3},{1,0,2},{10,0,1},{1,0,2},
    {15,0,3},{540,0,3},{2,0,3},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
// Line Type
    0,
    {{1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0},{3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {4,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}},
// Line Pattern
    0,
    {{43,0,0,87,0,1,439,0,2,439,0,2},{43,0,1,43,0,2,0,0,0,0,0,0},
    {43,0,3,505,0,4,505,0,4,43,0,5},{43,0,3,527,0,4,527,0,4,527,0,4},
    {527,0,4,43,0,5,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0}},
// Sync Value
    0,
//  {{0xFA,1,1,0},{0xBD,0,1,0},{0x80,0,1,0},{0xFA,1,0,0},{0xC0,0,0,0},
//  {0x80,0,0,0},{0,0,0,0},{0,0,0,0}}
    {{0x10,1,1,0},{0xD4,0,1,0},{0x80,0,1,0},{0x10,1,0,0},{0xD6,0,0,0},
    {0x80,0,0,0},{0,0,0,0},{0,0,0,0}}
};

_SAA7105_HDSyncGen _SAA7105_hdSyncGenVGA = 
{
// Line Count
    0,
    {{2,0,1},{33,0,2},{480,0,3},{10,0,2},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
    {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
// Line Type
    0,
    {{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}},
// Line Pattern
    0,
    {{95,0,8,703,0,9,0,0,0,0,0,0},{95,0,2,703,0,3,0,0,0,0,0,0},
    {95,0,2,47,0,4,639,0,5,15,0,4},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0}},
// Sync Value
    0,
    {{0x80,0,0,0},{0x80,1,0,0},{0x80,0,1,0},{0x80,1,1,0},
    {0xB0,1,1,0},{0xCC,1,1,0},{0,0,0,0},{0,0,0,0}}
};

_SAA7105_HDSyncGen _SAA7105_hdSyncGenSVGA = 
{
// Line Count
    0,
    {{4,0,1},{23,0,2},{600,0,3},{1,0,2},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
    {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
// Line Type
    0,
    {{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {3,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}},
// Line Pattern
    0,
    {{127,0,0,599,0,1,327,0,1,0,0,0},{127,0,2,599,0,3,327,0,3,0,0,0},
    {127,0,2,87,0,4,0,0,0,0,0,0},{399,0,5,399,0,5,39,0,4,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0}},
// Sync Value
    0,
    {{0x80,1,1,0},{0x80,0,1,0},{0x80,1,0,0},{0x80,0,0,0},
    {0xB0,0,0,0},{0xCC,0,0,0},{0,0,0,0},{0,0,0,0}}
};

_SAA7105_HDSyncGen _SAA7105_hdSyncGenXGA = 
{
// Line Count
    0,
    {{6,0,1},{29,0,2},{768,0,3},{3,0,2},{0,0,0},{0,0,0},{0,0,0},{0,0,0},
    {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}},
// Line Type
    0,
    {{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {3,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}},
// Line Pattern
    0,
    {{135,0,0,603,0,1,603,0,1,0,0,0},{135,0,2,603,0,3,603,0,3,0,0,0},
    {135,0,2,159,0,4,0,0,0,0,0,0},{511,0,5,511,0,5,23,0,4,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0}},
// Sync Value
    0,
    {{0x80,0,0,0},{0x80,1,0,0},{0x80,0,1,0},{0x80,1,1,0},
    {0xB0,1,1,0},{0xCC,1,1,0},{0,0,0,0},{0,0,0,0}}
};

/* DENC data structures */
_SAA7105_Regs _SAA7105_settingsDef = {
/* Status (0x00) = 0x00 */
    0x00,   /* uchar Status;  */                                        
    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,        
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,    
    0x00,0x00,0x00,0x00,0x00,0x00},             
/* Common DAC Adjust (0x16) = 0x00 */
    0,      /* unsigned DACAdjust : 4;  */
    0,      /* unsigned UnusedDACAdjust : 4;  */
/* Red DAC Adjust (0x17) = 0x1F   */
    0x1B,   /* unsigned RDACAdjust : 5; */
    0,      /* unsigned UnusedRDACAdjust : 3; */
/* Green DAC Adjust (0x18) = 0x1F   */
    0x1B,   /* unsigned GDACAdjust : 5; */
    0,      /* unsigned UnusedGDACAdjust : 3; */
/* Blue DAC Adjust (0x19) = 0x1F */
    0x1F,   /* unsigned BDACAdjust : 5; */
    0,      /* unsigned UnusedBDACAdjust : 3; */            
/* MSM Threshold (0x1A) = 0x70 */
    0x70,   /* uchar MSMThreshold; */ 
/* Monitor sense mode (0x1B) = 0x00  */
    0,      /* unsigned BComp : 1; */
    0,      /* unsigned GComp : 1; */
    0,      /* unsigned RComp : 1;  */
    0,      /* unsigned Reg1BUnused : 2; */
    0,      /* unsigned MSMOE : 1;       */
    0,      /* unsigned AutoMSMEnable : 1; */
    0,      /* unsigned MSMEnable : 1; */ 
/* Chip identification (0x1C) = 0x00  */
    0x00,   /* uchar ChipID; */
/* Null Array (0x1D) - (0x25) */
    {0x00,0x00,0x00,      
    0x00,0x00,0x00,0x00,0x00,0x00},             
/* Wide screen signal (0x26) = 0xFF */
    0xFF,   /* uchar WideScreenLSBits; */
/* Wide screen signal (0x27) = 0x3F */
    0x3F,   /* unsigned WideScreenMSBits : 6; */
    0,      /* unsigned WSUnused : 1; */
    0,      /* unsigned WideScreenEnable : 1;  */
/* Burst start (0x28) = 0x19 */
    0x19,   /* unsigned BurstStart : 6; */
    0,      /* unsigned BurstUnused : 2; */ 
/* Burst start (0x29) = 0x1D */
    0x1D,   /* unsigned BurstEnd : 6; */
    0,      /* unsigned Reg29Unused : 1; */
    0,      /* unsigned SyncResetEnable : 1; */             
/* Copy generation (0x2A) = 0xFF */
    0xFF,   /* uchar CopyGen0;  */
/* Copy generation (0x2B) = 0xFF */
    0xFF,   /* uchar CopyGen1;  */
/* Copy generation (0x2C) = 0x0F */
    0xF,    /* unsigned CopyGenMSBits : 4; */
    0,      /* unsigned Reg2CUnused : 3; */
    0,      /* unsigned CopyGenEnable : 1; */ 
/* Output Port Control (0x2D) = 0x72 */
    0,      /* unsigned Reg2DUnused : 1; */
    0,      /* unsigned CVBSEN2 : 1; */
    0,      /* unsigned CLK2EN : 1; */
    0,      /* unsigned ENCOFF : 1; */
    1,      /* unsigned CEN : 1; */
    1,      /* unsigned CVBSEN0 : 1; */
    0,      /* unsigned CVBSEN1 : 1; */
    0,      /* unsigned VBSEN : 1; */ 
/* Null Array (0x2E) - (0x36) */
    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, 
/* Input Path Control (0x37) = 0x00 */
    0,      /* unsigned XFilterActive : 1; */
    0,      /* unsigned InputLevel : 1; */
    0,      /* unsigned CursorZoom : 1; */
    0,      /* unsigned Reg37AUnused : 1; */
    0,      /* unsigned YUpscaleFilter : 2; */
    0,      /* unsigned YUpscaleActive : 1; */
    0,      /* unsigned Reg37BUnused : 1; */
/* Gain luminance for RGB (0x38) = 0x1A */
     0x1A,  /* unsigned RGBGainLuminance : 5; */
     0,     /* unsigned Reg38Unused : 3;  */
/* Gain chrominance for RGB (0x39) = 0x1A  */
     0x1A,  /* unsigned RGBGainChrominance : 5; */
     0,     /* unsigned Reg39Unused : 3;  */
/* Input Port Control (0x3A) = 0x0D        */
     1,     /* unsigned ChromaBinary : 1; */
     0,     /* unsigned LumaBinary : 1; */
     1,     /* unsigned CompSyncEnable : 1; */
     1,     /* unsigned YUVToRGBBypass : 1; */
     0,     /* unsigned SyncVia656 : 1;     */
     0,     /* unsigned SYNTV : 1;          */
     0,     /* unsigned Reg3AUnused : 1;    */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -