📄 devices.c
字号:
/*
$Workfile: devices.c $
$Revision: 1.5 $
$Date: Jul 06 2006 20:41:06 $
*/
//******************************************************************
//
// Copyright (C) 2002. GENESIS MICROCHIP INC.
// All rights reserved. No part of this program may be reproduced.
//
// Genesis Microchip Corp., 2150 Gold Street
// Alviso, CA 95002 USA
// Genesis Microchip Inc., 165 Commerce Valley Dr. West
// Thornhill, Ontario, Canada, L3T 7V8
//
//================================================================
//
// MODULE: devices.c
//
//******************************************************************
#include "inc\all.h"
//**************************************************************
// L O C A L V A R I A B L ES
//**************************************************************
//**************************************************************
// L O C A L D E F I N I T I O N S
//**************************************************************
//**************************************************************
// L O C A L F U N C T I O N P R O T O T Y P E S
//**************************************************************
//**************************************************************
// C O D E
//**************************************************************
//***************************************************************
// DESCRIPTION : Turn Led Red
// SYNTAX : void LedRed(void)
//***************************************************************
#if HDCP_ENABLE_4TH&& HDCP_SHOW_DEBUG_SIGNAL
//sweng0614: For HDCP Debug purpose, we need 2 GPO pins to indicate HDCP_BLOCK and DVI_BLOCK On/Off
// Here, we use the LED control pins for temporary usage.
// Therefore, we disable LED functions.
void LedRed(void) {}
void LedOrange(void){}
void LedGreen(void) {}
void LedOff(void) {}
#else
void LedRed(void)
{
#ifdef PHOENIX
gm_ClearAndSetBitsByte(GPO_OUTPUT, LED_MASK, LED_RED);
#endif
}
//***************************************************************
// DESCRIPTION : Turn Led Orange (Or Amber (both green and red for phoenix))
// SYNTAX : void LedOrange(void)
//***************************************************************
void LedOrange(void)
{
#ifdef PHOENIX
gm_ClearAndSetBitsByte(GPO_OUTPUT, LED_MASK, LED_ORANGE);
#else
// Green LED off. Orange LED on.
#if LED_POL == NEG_POL
gm_ClearAndSetBitsByte(GPOUTPUT1, LED_ORANGE, LED_GREEN);
#else
gm_ClearAndSetBitsByte(GPOUTPUT1, LED_GREEN, LED_ORANGE);
#endif
#endif
}
//***************************************************************
// DESCRIPTION : Turn Green LED by GPIO
// SYNTAX : void LedGreen(void)
//***************************************************************
void LedGreen(void)
{
#ifdef PHOENIX
gm_ClearAndSetBitsByte(GPO_OUTPUT, LED_MASK, LED_GREEN);
#else
// Green LED on. Orange LED off.
#if LED_POL == NEG_POL
gm_ClearAndSetBitsByte(GPOUTPUT1, LED_GREEN, LED_ORANGE);
#else
gm_ClearAndSetBitsByte(GPOUTPUT1, LED_ORANGE, LED_GREEN);
#endif
#endif
}
//***************************************************************
// DESCRIPTION : Turn off LEDs (Green & Orange) by GPIO
// SYNTAX : void LedOff(void)
//***************************************************************
void LedOff(void)
{
#ifdef PHOENIX
gm_ClearRegBitsByte(GPO_OUTPUT, LED_MASK);
#else
// Green LED off. Orange LED off.
#if LED_POL == NEG_POL
gm_SetRegBitsByte(GPOUTPUT1, (LED_GREEN | LED_ORANGE));
#else
gm_ClearRegBitsByte(GPOUTPUT1, (LED_GREEN | LED_ORANGE));
#endif
#endif
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -