hw_rgbpanel.c

来自「瑞星微公司RK27XX系列芯片的SDK开发包」· C语言 代码 · 共 87 行

C
87
字号
/******************************************************************/
/*   Copyright (C) 2007 ROCK-CHIPS FUZHOU . All Rights Reserved.  */
/*******************************************************************
File :  hw_Rgbpanel.c
Desc :  RGB接口LCD驱动

Author :  nzy
Date :
Notes :

$Log :
*********************************************************************/
#include "hw_include.h"
#include "hwapi_Rgbpanel.h"


/*---------------------------------------------------------
Name  :  Rgbpanel_PowerOnInit
Desc  :  RGB接口的屏上电初始化
Params:
Return:
Author:  nzy
Date  :
-----------------------------------------------------------*/
void Rgbpanel_PowerOnInit(void)
{
#if(LCDPANEL == RGBIF_TPG121)
    Tpg121_PowerOnInit();
#endif
#if(LCDPANEL == RGBIF_TPG051)
    Tpg051_PowerOnInit();
#endif
#if(LCDPANEL == RGBIF_A030FL01)
    A030fl01_PowerOnInit();
#endif
}


/*---------------------------------------------------------
Name  :  Rgbpanel_Standby
Desc  :  RGB接口的屏省电模式
Params:
Return:
Author:  nzy
Date  :
-----------------------------------------------------------*/
void Rgbpanel_Standby(RGBLCDSTATUS Enable)
{

}


/*---------------------------------------------------------
Name  :  Rgbpanel_SetFreq
Desc  :
Params:
Return:
Author:  nzy
Date  :
-----------------------------------------------------------*/
void Rgbpanel_SetFreq(UINT32 Freq)
{
    UINT32 FreDiv;

    if (Freq >= 24)
    {
        FreDiv = 0x0;
    }
    else if (24 % Freq == 0)
    {
        FreDiv = 24 / Freq - 1;
        Freq = 24;
    }
    else
    {
        Freq = Freq * 12;
        FreDiv = 11;
    }

    Pll_SetFrequence(PLL_AUX, Freq);
    ClrRegBits32(&pSCUReg->SCU_DIVCON , 0x3ff << 18);//Clear
    SetRegBits32(&pSCUReg->SCU_DIVCON , 0x2 << 18);//Set codec pll as source
    SetRegBits32(&pSCUReg->SCU_DIVCON , FreDiv << 20);
}


⌨️ 快捷键说明

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