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

📄 msscartprocess.h

📁 lcd tv : MST9E19A原代码
💻 H
字号:
/******************************************************************************
 Copyright (c) 2003 MStar Semiconductor, Inc.
 All rights reserved.

 [Module Name]: scart_process.h
 [Date]:        31-Dec-2003
 [Comment]:
   scart pin8 control header file.
 [Reversion History]:
*******************************************************************************/

#include "define.h"
#include "mcu.h"

#include "board.h"

#ifndef _SCART_H_
#define _SCART_H_

#ifdef _SCART_C_
#define _SCARTDEC_
#else
#define _SCARTDEC_ extern
#endif

/* //Bruce.Ding uncomment 060922 13:09 --[Scart priority]
#if (MCU_TYPE_SEL == MCU_TYPE_MST)
  // BK1_49: SAR0 data
  // BK1_4A: SAR1 data
  // BK1_4B: SAR2 data
  // BK1_4C: SAR3 data
#include "msreg.h"

#ifndef Scart1AdcPin
#define Scart1AdcPin    BK1_4B // SAR2
#endif

#ifndef Scart2AdcPin
#define Scart2AdcPin    BK1_4C // SAR3
#endif
#else
 #ifndef Scart1AdcPin
 #define Scart1AdcPin    BK1_94 // SAR2
 #endif

 #ifndef Scart2AdcPin
 #define Scart2AdcPin    BK1_95 // SAR3
 #endif

#endif
*/ //Bruce.Ding uncomment end

// please modify 12V to 1.8V by resistor
//#define PIN8_THRESHOLD_LOW    0x08 //(0x40*0x3F/0xFF)     /**  3.0 Volt */
//#define PIN8_THRESHOLD_MID    0x16 //(0xA0*0x3F/0xFF)     /**  8.0 Volt */
//MST A/D 6 bit only

#define  PIN8_LOW        0
#define  PIN8_MID        1
#define  PIN8_HIGH       2

#define SCART_HANDLER_COUNT     1000
typedef enum
{
    PIN8_FORMAT_OFF,
    PIN8_FORMAT_16_9,
    PIN8_FORMAT_4_3
} ScartFormatEnumType;

typedef enum
{
    PIN8_MIN_EVENT,
    // SCART1
    PIN8_SCART1_LM,
    PIN8_SCART1_LH,
    PIN8_SCART1_ML,
    PIN8_SCART1_MH,
    PIN8_SCART1_HL,
    PIN8_SCART1_HM,
  #if (ENABLE_SCART2)  
    // SCART2
    PIN8_SCART2_LM,
    PIN8_SCART2_LH,
    PIN8_SCART2_ML,
    PIN8_SCART2_MH,
    PIN8_SCART2_HL,
    PIN8_SCART2_HM,
  #endif  
    //
    PIN8_MAX_EVENT
} ScartEventEnumType;


_SCARTDEC_ void msScartPortHandler(void);
_SCARTDEC_ XDATA WORD g_ucScartHandlerCount;
_SCARTDEC_ XDATA BOOL g_ucScartForceSwitch[2];
_SCARTDEC_  XDATA BYTE ucPin8PrevEvent;    // must be a value which is not PIN8
_SCARTDEC_  XDATA BYTE ucPin8StatusOld[2];
    
#endif

⌨️ 快捷键说明

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