?? scart.c
字號:
/******************************************************************************
Copyright (c) 2002 ALi Corporation. All Rights Reserved.
File name: SCART.c
Purpose:
SCART TV Control
Public functions/variables:
Private functions/variables:
History:
Date by Reason
========== ============ ===================================================
2002/11/21 Edmund Huang Created.
******************************************************************************/
#include <platform.h>
#if (_SCART==SCART_Enable)
#include <gpio.h>
#include <pe.h>
#include <itron.h>
/*--------------------------------------------------------------------
Function name : TurnOnScartTV()
Purpose : Turn on/off SCART TV
Input : BOOL on, on=TRUE, turn on RGB; on=FALSE, turn off RGB
Output : none
Return : none
Reference : SCART TV specs.
Example :
Remark :
--------------------------------------------------------------------*/
void SetScartRGB(BOOL on)
{
if (on == TRUE)
{
SET_GPIO_W(SCART_RGB);
SET_GPIO_LOW(SCART_RGB);
PRINTF("Set SCART_RGB low\n");
}
else
{
SET_GPIO_W(SCART_RGB);
SET_GPIO_HI(SCART_RGB);
PRINTF("Set SCART_RGB high");
}
}
/*--------------------------------------------------------------------
Function name : SetScartVideoStatus()
Purpose : Set SCART video status as 4:3 or 16:9
Input :
int status; status==0, 4:3 mode; status==1, 16:9 mode.
Output : none
Return : none
Reference : SCART TV spec.
Example :
Remark :
--------------------------------------------------------------------*/
void SetScartVideoStatus(int status)
{
if (status == 0)
{ // Support 4:3
SET_GPIO_W(SCART_SW);
SET_GPIO_LOW(SCART_SW);
PRINTF("Set SCART_TV high\n");
}
else
{// Support 16:9
SET_GPIO_W(SCART_SW);
SET_GPIO_HI(SCART_SW);
PRINTF("Set SCART_TV low\n");
}
SET_GPIO_W(SCART_TV);
SET_GPIO_LOW(SCART_TV);
PRINTF("Set SCART_SW high\n");
}
/*--------------------------------------------------------------------
Function name : SetSCARTMode()
Purpose : Set SCART mode
Input : SCART_MODE mode
Output : none
Return : none
Reference : SCART TV specs.
Example :
Remark :
--------------------------------------------------------------------*/
void SetSCARTScreenMode(SCART_SCREEN_MODE mode)
{
PRINTF("SetSCARTScreenMode():: mode = %d\n", mode);
if (mode == SCART_4_3)
{
SetScartVideoStatus(0);
}
else
{
SetScartVideoStatus(1);
}
}
/*--------------------------------------------------------------------
Function name : SetSCARTMode()
Purpose : Set SCART mode
Input : SCART_MODE mode
Output : none
Return : none
Reference : SCART TV specs.
Example :
Remark :
--------------------------------------------------------------------*/
void SetSCARTTVMode(SCART_TV_MODE mode)
{
PRINTF("SetSCARTTVMode():: mode = %d\n", mode);
if (mode == SCART_CVBS)
{
SetScartRGB(FALSE);
}
else
{
SetScartRGB(TRUE);
}
}
#define PRINTF(...)
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -