l1_osd.c

来自「dz3000_51.0.0.4.rar」· C语言 代码 · 共 184 行

C
184
字号
/*++
Copyright (c) 2001 Sunplus Technology Co., Ltd.

Module Name:

        L1_OSD.c

Abstract:

        Module related to L1 OSD functions

Environment:

        Keil C51 Compiler

Revision History:

        11/12/2001      CMLin    created                 
--*/

//=============================================================================
//Header file
//=============================================================================
#include "general.h"
#include "main.h"
#include "initio.h"
//=============================================================================
//Symbol
//=============================================================================
//-----------------------------------------------------------------------------
//Constant
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
//Variable
//-----------------------------------------------------------------------------

//=============================================================================
//Program
//=============================================================================
//-----------------------------------------------------------------------------
//L1_SimUpLoadFOSD
//-----------------------------------------------------------------------------
UCHAR L1_SimUpLoadFOSD(UCHAR Para0) USING_0
{
	UCHAR Temp0 = Para0;	

	return L1K_SUCCESS;
}

//-----------------------------------------------------------------------------
//L1_SimDownLoadFOSD
//-----------------------------------------------------------------------------
UCHAR L1_SimDownLoadFOSD(UCHAR Para0) USING_0
{
	UCHAR Temp0 = Para0;	

	return L1K_SUCCESS;
}

//-----------------------------------------------------------------------------
//L1_GOSDDemoEnter
//-----------------------------------------------------------------------------
UCHAR L1_GOSDEnter(void) USING_0
{
/*
	UCHAR y;	
	USHORT i;
     ULONG GOSDAddr;
     ULONG DSPAddr;   

     DSPAddr = K_SDRAM_DisplayBufAAddr;
     GOSDAddr = K_SDRAM_GrafFontBufAddr;

        //PRINT_L1("    L1_GOSDEnter: Enter\n");

	// copy the original image to the SDRAM 'G_FreeAddr' (240x46)
	L2_CopyImage(DSPAddr,  G_DSPHsize, G_DSPVsize, 0, 0, 240, 46, G_FreeAddr, 240, 46, 0, 0);
	// pull down the graphic OSD menu
	for(y=9; y<46; y+=9)
        {
		L2_CopyImage(G_FreeAddr, 240, 46, 0, 0, 240, 46, DSPAddr, G_DSPHsize, G_DSPVsize, 0, 0);
		L2_SetCopyColorKey(0x01, 0x10);
		L2_CopyImage(GOSDAddr, 512, 128, 0, 46-y, 240, y, DSPAddr, G_DSPHsize, G_DSPVsize, 0, 0);
		L2_SetCopyColorKey(0x00, 0x10);
		for(i=0; i<10000; i++);
	}

	// set color key threshold value for transparency
	L2_SetCopyColorKey(0x01, 0x10);
	// turn on the first icon
	L2_CopyImage(GOSDAddr, 512, 128, 0, 46, 40, 46, G_DSPAddr, DSPHsize, G_DSPVsize, 0, 0);
	// disable color key
	L2_SetCopyColorKey(0x00, 0x10);

        //PRINT_L1("    L1_GOSDEnter: Exit\n");
*/
	return L1K_SUCCESS;
}

UCHAR L1_GOSDExit(void) USING_0
{
/*
        //PRINT_L1("    L1_GOSDExit: Enter\n");

     ULONG DSPAddr;   

     DSPAddr = K_SDRAM_DisplayBufAAddr;
	// restore the original picture
	L2_CopyImage(G_FreeAddr, 240, 46, 0, 0, 240, 46, DSPAddr, G_DSPHsize, G_DSPVsize, 0, 0);

	G_GOSDID=0;

        //PRINT_L1("    L1_GOSDExit: Exit\n");
*/
	return L1K_SUCCESS;
}

UCHAR L1_GOSDShiftR(void) USING_0
{
/*
        //PRINT_L1("    L1_GOSDShiftR: Enter\n");

     ULONG GOSDAddr;
     ULONG DSPAddr;   

     DSPAddr = K_SDRAM_DisplayBufAAddr;
     GOSDAddr = K_SDRAM_GrafFontBufAddr;
	
	if(G_GOSDID==5)
        {
                //PRINT_L1("    L1_GOSDShiftR: Exit\n");
		return L1K_SUCCESS;
	}

	G_GOSDID++;

	L2_SetCopyColorKey(0x01, 0x10);

	// turn off the current icon, and turn on the right-side icon
	if(G_GOSDID!=0) L2_CopyImage(GOSDAddr, 512, 128, 0+ 40*(G_GOSDID-1),  0, 40, 46, DSPAddr, G_DSPHsize, G_DSPVsize, 0+40*(G_GOSDID-1), 0);
	L2_CopyImage(GOSDAddr, 512, 128, 0+ 40*(G_GOSDID), 46, 40, 46, DSPAddr, G_DSPHsize, G_DSPVsize, 0+40*(G_GOSDID), 0);

	L2_SetCopyColorKey(0x00, 0x10);

        //PRINT_L1("    L1_GOSDShiftR: Exit\n");
*/
	return L1K_SUCCESS;
}

UCHAR L1_GOSDShiftL(void) USING_0
{
/*
     //PRINT_L1("    L1_GOSDShiftL: Enter\n");

     ULONG GOSDAddr;
     ULONG DSPAddr;   

     DSPAddr = K_SDRAM_DisplayBufAAddr;
     GOSDAddr = K_SDRAM_GrafFontBufAddr;

	if(G_GOSDID==0)
        {
                //PRINT_L1("    L1_GOSDShiftL: Exit\n");
		return L1K_SUCCESS;
	}

	G_GOSDID--;

	L2_SetCopyColorKey(0x01, 0x10);

	// turn off the current icon, and turn on the left-side icon
	if(G_GOSDID!=5) L2_CopyImage(GOSDAddr, 512, 128, 0+ 40*(G_GOSDID+1),  0, 40, 46, DSPAddr, G_DSPHsize, G_DSPVsize, 0+40*(G_GOSDID+1), 0);
	L2_CopyImage(GOSDAddr, 512, 128, 0+ 40*(G_GOSDID), 46, 40, 46, DSPAddr, G_DSPHsize, G_DSPVsize, 0+40*(G_GOSDID), 0);

	L2_SetCopyColorKey(0x00, 0x10);

        //PRINT_L1("    L1_GOSDShiftR: Exit\n");
*/
	return L1K_SUCCESS;
}


⌨️ 快捷键说明

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