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

📄 app_dol2function_cpu.c

📁 台湾凌阳方案300万数码相机源代码
💻 C
📖 第 1 页 / 共 2 页
字号:
}

//-----------------------------------------------------------------------------
//App_DoL2Function_CPU
//-----------------------------------------------------------------------------
/*
routine description:
        Do specified CPU L2 Function
arguments:
        L2_FuncID       - L2 Function ID (05)
        ArgBuf  - Pointer to the argument buffer 
return value:
                0x00    - success
*/
UCHAR App_DoL2Function_CPU(UCHAR L2_FuncID, ULONG *ArgBuf)
{
        UCHAR  ByteData;
        USHORT WordData;
        //ULONG  LongData;
          
        switch (L2_FuncID)
        {
                case 0x00:
                        L2_InitCPU((UCHAR)ArgBuf[0]);
                        //PRINT_APP("L2 0500 finish\n");
                        break;

                case 0x01:
                        L2_Set4KSRAMMode((UCHAR)ArgBuf[0]);
                        //PRINT_APP("L2 0501 finish\n");
                        break;

                case 0x02:
                        L2_4KSRAMBufIdx((UCHAR)ArgBuf[0],(USHORT)ArgBuf[1],&WordData,&WordData);
                        //PRINT_APP("L2 0502 finish\n");
                        break;

                case 0x03:
                        L2_Write4KSRAMPort((UCHAR)ArgBuf[0]);
                        //PRINT_APP("L2 0503 finish\n");
                        break;

                case 0x04:
                        L2_Read4KSRAMPort(&ByteData);
                        //PRINT_APP("L2 0504 finish\n");
                        break;

                case 0x05:
                        L2_DownloadROM((USHORT)ArgBuf[0], (ULONG)ArgBuf[1], (USHORT)ArgBuf[2]);
                        //PRINT_APP("L2 0505 finish\n");
                        break;

                case 0x06:
                        L2_ConfigIRQ((USHORT)ArgBuf[0]);
                        //PRINT_APP("L2 0506 finish\n");
                        break;

                case 0x07:
                        L2_ClearIRQ((UCHAR)ArgBuf[1]);
                        //PRINT_APP("L2 0507 finish\n");
                        break;

                case 0x08:
                        L2_CheckIRQ((USHORT)ArgBuf[0], &ByteData);
                        //PRINT_APP("L2 0508 finish\n");
                        break;

#ifdef TestModeEn
                case 0xff:
                        L2_TestCPU((UCHAR)ArgBuf[0]);
                        break;
#endif

                default:
                        break;
        }

        return L2K_SUCCESS;
}

//-----------------------------------------------------------------------------
//App_DoL2Function_DMAC
//-----------------------------------------------------------------------------
/*
routine description:
        Do specified DMAC L2 Function
arguments:
        L2_FuncID       - L2 Function ID (04)
        ArgBuf  - Pointer to the argument buffer 
return value:
        0x00    - success
*/
UCHAR App_DoL2Function_DMAC(UCHAR L2_FuncID, ULONG *ArgBuf)
{
        UCHAR  ByteData;
        USHORT WordData;
        ULONG  LongData;

        switch (L2_FuncID)
        {
                case 0x00:
                        L2_DoDMA((UCHAR)ArgBuf[0], (UCHAR)ArgBuf[1], (USHORT)ArgBuf[2], (UCHAR)ArgBuf[3], (UCHAR)ArgBuf[4]);
                        //PRINT_APP("L2 0400 finish\n");
                        break;

                case 0x01:
                        L2_ResetDMA();
                        //PRINT_APP("L2 0401 finish\n");
                        break;

                case 0x02:
                        L2_GetDMABufSize(&ByteData);
                        //PRINT_APP("L2 0402 finish\n");
                        break;

                case 0x03:
                        L2_WriteDMAPort((UCHAR)ArgBuf[0]);
                        //PRINT_APP("L2 0403 finish\n");
                        break;

                case 0x04:
                        L2_ReadDMAPort(&ByteData);
                        //PRINT_APP("L2 0404 finish\n");
                        break;

                case 0x05:
                        L2_CheckDMACmp(&ByteData);
                        //PRINT_APP("L2 0405 finish\n");
                        break;

                case 0x06:
                        L2_SetDRAMDMA((ULONG)ArgBuf[0]);
                        //PRINT_APP("L2 0406 finish\n");
                        break;

                case 0x07:
                        L2_SetSRAMDMA((USHORT)ArgBuf[0]);
                        //PRINT_APP("L2 0407 finish\n");
                        break;

                case 0x08:
                        L2_SetUSBDMA((UCHAR)ArgBuf[0], (UCHAR)ArgBuf[1]);
                        //PRINT_APP("L2 0408 finish\n");
                        break;

                case 0x09:
                        L2_ReadDRAMDMAAdr(&LongData);
                        //PRINT_APP("L2 0409 finish\n");
                        break;

                case 0x0A:
                        L2_SearchPattern((ULONG)ArgBuf[0], (UCHAR)ArgBuf[1], (UCHAR)ArgBuf[2], (USHORT)ArgBuf[3],&WordData,&WordData);
                        //PRINT_APP("L2 040A finish\n");
                        break;

#ifdef TestModeEn
                case 0xff:
                        L2_TestDMAC((UCHAR)ArgBuf[0]);
                        break;
#endif

                default:
                        break;
        }

        return L2K_SUCCESS;
}

//-----------------------------------------------------------------------------
//App_DoL2Function_LCDTV
//-----------------------------------------------------------------------------
/*
routine description:
        Do specified LCDTV L2 Function
arguments:
        L2_FuncID       - L2 Function ID
        ArgBuf  - Pointer to the argument buffer 
return value:
                0x00    - success
*/
UCHAR App_DoL2Function_LCDTV(UCHAR L2_FuncID, ULONG *ArgBuf)
{
        switch (L2_FuncID)
        {
                case 0x00:
                        L2_InitLCDTV((ULONG)ArgBuf[0]);
                        break; 

                default:
                        break;
        }

        return L2K_SUCCESS;
}

//-----------------------------------------------------------------------------
//App_DoL2Function_SDRAM
//-----------------------------------------------------------------------------
/*
routine description:
        Do specified SDRAM L2 Function
arguments:
        L2_FuncID       - L2 Function ID
        ArgBuf  - Pointer to the argument buffer 
return value:
        0x00    - success
*/
UCHAR App_DoL2Function_SDRAM(UCHAR L2_FuncID, ULONG *ArgBuf)
{
        switch (L2_FuncID)
        {
                case 0x00:
                        L2_InitSDRAM((ULONG)ArgBuf[0]);
                        break;

/*
                case 0x11:
                        L2_SetJPEGVscale((USHORT)ArgBuf[0], (USHORT)ArgBuf[1]);
                        break;  

                case 0x12:
                        L2_WriteQTable((UCHAR)ArgBuf[0], (UCHAR)ArgBuf[1], NULL);
                        break;

                case 0x20:
                        L2_Compress((UCHAR)ArgBuf[0], ArgBuf[1], (USHORT)ArgBuf[2], (USHORT)ArgBuf[3],
                                        ArgBuf[4], ArgBuf[5], (UCHAR)ArgBuf[6]); 
                        break;

                case 0x21:
                        L2_DeCompress(ArgBuf[0], (USHORT)ArgBuf[1], (USHORT)ArgBuf[2], ArgBuf[3],
                                        (UCHAR)ArgBuf[4], (UCHAR)ArgBuf[5]);
                        break;
*/

                default:
                        break;
        }

        return L2K_SUCCESS;
}

//-----------------------------------------------------------------------------
//App_DoL2Function_Front
//-----------------------------------------------------------------------------
/*
routine description:
        Do specified Front L2 Function
arguments:
        L2_FuncID       - L2 Function ID
        ArgBuf  - Pointer to the argument buffer 
return value:
        0x00    - success
*/
UCHAR App_DoL2Function_Front(UCHAR L2_FuncID, ULONG *ArgBuf)
{
        switch (L2_FuncID)
        {
                case 0x00:
                        L2_InitFront((ULONG)ArgBuf[0]);
                        break; 

                default:
                        break;
        }

        return L2K_SUCCESS;
}

//-----------------------------------------------------------------------------
//App_DoL2Function_Misc
//-----------------------------------------------------------------------------
/*
routine description:
        Do specified Misc L2 Function
arguments:
        L2_FuncID       - L2 Function ID
        ArgBuf  - Pointer to the argument buffer 
return value:
        0x00    - success
*/
UCHAR App_DoL2Function_Misc(UCHAR L2_FuncID, ULONG *ArgBuf)
{
        UCHAR temp0 = L2_FuncID;
        ULONG *temp1 = ArgBuf;

        return L2K_SUCCESS;
}

//-----------------------------------------------------------------------------
//App_DoL2Function_USB
//-----------------------------------------------------------------------------
/*
routine description:
        Do specified USB L2 Function
arguments:
        L2_FuncID       - L2 Function ID
        ArgBuf  - Pointer to the argument buffer 
return value:
        0x00    - success
*/
UCHAR App_DoL2Function_USB(UCHAR L2_FuncID, ULONG *ArgBuf)
{
        UCHAR temp0 = L2_FuncID;
        ULONG *temp1 = ArgBuf;

        return L2K_SUCCESS;
}

⌨️ 快捷键说明

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