📄 app_dol1function.c
字号:
/*++
Copyright (c) 2001 Sunplus Technology Co., Ltd.
Module Name:
L1_DoFunction.c
Abstract:
Select the corresponding L1 L2 Function for USB vendor command
Environment:
Keil C51 Compiler
Revision History:
11/12/2001 YPWang created
--*/
//=============================================================================
//Header file
//=============================================================================
#include "general.h"
#include "App.h"
#include "main.h"
#include "initio.h"
#include "playback.h"
//patch4.4@richie@isp
#include "uiflow.h"
#include "unistd.h"
//=============================================================================
//Symbol
//=============================================================================
//-----------------------------------------------------------------------------
//Constant
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//Variable
//-----------------------------------------------------------------------------
//patch4.3@richie@je0531
extern data UCHAR G_ucISPCheck1;
extern data UCHAR G_ucISPCheck2;
//=============================================================================
//Program
//=============================================================================
//-----------------------------------------------------------------------------
//App_DoL1Function_System
//-----------------------------------------------------------------------------
/*
routine description:
Do specified System L1 Function
arguments:
L1_FuncID - L1 Function ID
ArgBuf - Pointer to the argument buffer
return value:
0x00 - success
*/
UCHAR App_DoL1Function_System(UCHAR L1_FuncID, ULONG *ArgBuf) USING_0
{
switch(L1_FuncID)
{
case 0x00:
L1_InitSPCA533((UCHAR)ArgBuf[0]);
break;
case 0x01:
L1_InitPowerOn();
break;
case 0x02:
L1_InitPreview(1);
break;
case 0x03:
L1_InitPlayback();
break;
case 0x04:
L1_InitPCCam();
break;
case 0x05:
L1_InitVideoClip();
break;
case 0x06:
L1_InitDSC();
break;
case 0x07:
L1_ISP(ArgBuf[0], ArgBuf[1], ArgBuf[2], (USHORT)ArgBuf[3]);
break;
case 0x08:
L1_UICtrl();
break;
case 0x09:
L1_UpLoadGOSD(ArgBuf[0], ArgBuf[1], (USHORT)ArgBuf[2], (USHORT)ArgBuf[3]);
break;
case 0x0a:
L1_UpLoadFOSD(ArgBuf[0], ArgBuf[1]);
break;
case 0x0b:
L1_UpLoadBadPxlCoor(ArgBuf[0]);
break;
default:
break;
}
return L2K_SUCCESS;
}
//-----------------------------------------------------------------------------
//App_DoL1Function_Preview
//-----------------------------------------------------------------------------
/*
routine description:
Do specified Preview L1 Function
arguments:
L1_FuncID - L1 Function ID
ArgBuf - Pointer to the argument buffer
return value:
0x00 - success
*/
UCHAR App_DoL1Function_Preview(UCHAR L1_FuncID, ULONG *ArgBuf) USING_0
{
UCHAR temp0 = L1_FuncID;
ULONG *temp1 = ArgBuf;
ULONG temp2;
UCHAR tmp;//Davis@05.3.3 add for debug
switch(L1_FuncID)
{
case 0x00:
if(G_PVZFactor==0) G_PVZFactor=20;
else G_PVZFactor=0;
L1_InitPreview(1);
break;
case 0x01:
L1_SnapOne(temp1, &temp2); //ada@0111
break;
case 0x02:
L1_VideoClip();
break;
case 0x03:
//L1_PBVideo();
L1_PBVideoEx(ArgBuf[0]);
break;
case 0x04:
L1_DoAllBadPixel(ArgBuf[0],(USHORT)ArgBuf[1], (USHORT)ArgBuf[2]);
break;
case 0x05:
//L1_PutDateStamp(ArgBuf[0], (USHORT)ArgBuf[1], (USHORT)ArgBuf[2], (USHORT)ArgBuf[3], (USHORT)ArgBuf[4], (UCHAR)ArgBuf[5], (UCHAR)ArgBuf[6], (UCHAR)ArgBuf[7], (UCHAR)ArgBuf[8], (UCHAR)ArgBuf[9]);
//patch5.0@richie@sdram mapping begin
L1_PutDateStamp(K_SDRAM_ImagePlaybackDisplayBufAddr, G_DSPHsize, G_DSPVsize, 80, 128, L2K_DateYellow, 0x02, 0x00, 0x01, 0x00);
//patch5.0@richie@sdram mapping end
break;
case 0x06:
L1_AE(0);
break;
case 0x07:
L1_AWB();
#if DEBUG_COLOR
CMPGrGb(tmp);
if(tmp)
SetGrEqGb();//add for debug
#endif
break;
case 0x08:
#if AAA_OPTION
//richie@ae0226
//L1_AF();
#endif
break;
case 0x09:
L1_ContiShot((UCHAR)ArgBuf[0]);
break;
case 0x0A:
//patch4.2@richie@0516
L1_AppSnapRaw();
break;
case 0x0B:
//patch4.2@richie@0516
L1_AppSnapOne();
break;
//patch4.4@yichang@badpixel begin
case 0x0C:
L1_AppSnapRawSub();
break;
//patch4.4@yichang@badpixel end
/*
case 0x00: //Normal preview fuction
G_PVZFactor=0;
L1_InitSPCA533(1);
break;
case 0x01: //Digital Zoom x2 function
G_PVZFactor=20;
L1_InitSPCA533(1);
break;
case 0x02: //Snap One picture function
L1_SnapOne(1);
break;
*/
default:
break;
}
return L1K_SUCCESS;
}
//-----------------------------------------------------------------------------
//App_DoL1Function_Playback
//-----------------------------------------------------------------------------
/*
routine description:
Do specified Playback L1 Function
arguments:
L1_FuncID - L1 Function ID
ArgBuf - Pointer to the argument buffer
return value:
0x00 - success
*/
UCHAR App_DoL1Function_Playback(UCHAR L1_FuncID, ULONG *ArgBuf) USING_0
{
switch(L1_FuncID)
{
case 0x00:
L1_PBOne((UCHAR)ArgBuf[0]);
break;
case 0x01:
L1_PBFour((UCHAR)ArgBuf[0]);
break;
case 0x02:
L1_PBNine();
break;
case 0x04:
L1_PBZoom((UCHAR)ArgBuf[0]);
break;
case 0x05:
L1_PBPan((USHORT)ArgBuf[0],(USHORT)ArgBuf[1]);
break;
case 0x06:
L1_PBInfo((UCHAR)ArgBuf[0]);
break;
default:
break;
}
return L2K_SUCCESS;
}
//-----------------------------------------------------------------------------
//App_DoL1Function_Audio
//-----------------------------------------------------------------------------
/*
routine description:
Do specified Audio L1 Function
arguments:
L1_FuncID - L1 Function ID
ArgBuf - Pointer to the argument buffer
return value:
0x00 - success
*/
UCHAR App_DoL1Function_Audio(UCHAR L1_FuncID, ULONG *ArgBuf) USING_0
{
UCHAR temp0 = L1_FuncID;
ULONG *temp1 = ArgBuf;
switch(L1_FuncID)
{
case 0x00:
L1_RecordAudio(ArgBuf[0], ArgBuf[1], ArgBuf[2], (UCHAR)ArgBuf[3]);
break;
case 0x01:
L1_PlaybackAudio(ArgBuf[0], ArgBuf[1], ArgBuf[2], (UCHAR)ArgBuf[3], (UCHAR)ArgBuf[4]);
break;
case 0xfd: // write pcm file to nand flash
L1_NANDtoDRAM(0, 0x500000, 0xA000);
break;
case 0xfe: // write pcm file to nand flash
L1_DRAMtoNAND(0, 0x500000, 0x32000);
break;
case 0xff: // audio demo
L1_PlaybackAudio(0x00, 0x500000, 0x32000, 0x00, 0x02);
L1_RecordAudio(0x00, 0x532000, 0xA000, 0x62);
L1_PlaybackAudio(0x00, 0x532000, 0xA000, 0x40, 0x02);
break;
default :
break;
}
return L1K_SUCCESS;
}
//-----------------------------------------------------------------------------
//App_DoL1Function_PC
//-----------------------------------------------------------------------------
/*
routine description:
Do specified PC L1 Function
arguments:
L1_FuncID - L1 Function ID
ArgBuf - Pointer to the argument buffer
return value:
0x00 - success
*/
UCHAR App_DoL1Function_PC(UCHAR L1_FuncID, ULONG* ArgBuf) USING_0
{
switch(L1_FuncID)
{
case 0x00:
L1_UploadFAT((UCHAR)ArgBuf[0]);
break;
case 0x01:
L1_UploadFile((UCHAR)ArgBuf[0]);
break;
case 0x02:
L1_UploadAll((UCHAR)ArgBuf[0]);
break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -