chiplib.h
来自「是一个手机功能的模拟程序」· C头文件 代码 · 共 1,014 行 · 第 1/2 页
H
1,014 行
// This routine will determine the current frequency of the PLL.
//
// PARAMETERS:
// error - returns TRUE if the PLL registers have invalid values
// returns FALSE otherwise
//
// RETURNS:
// The current frequency of the PLL in Hz.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
UInt32 GetPll( int *error );
//---------------------------------------------------------------------------
// GetPllMuxOutputFreq()
//
// DESCRIPTION:
// This routine will determine the current output frequency of the PLL
// multiplexer (either CLKI or PLL).
//
// PARAMETERS:
// *pSrcClk - Returns SRC_CLKI if CLKI is the source clock.
// Returns SRC_PLL if the Internal PLL is the source clock.
// If this value isn't needed, set pSrcClk to NULL
//
// *pPllMuxError - Returns PLLMUXERROR_NONE if there are no errors.
// Returns PLLMUXERROR_INVALID_VALUES if the PLL registers have invalid values.
// Returns PLLMUXERROR_CLKI_NOT_32768 if CLKI is not configured to 32.768 kHz.
// If this value isn't needed, set pPllMuxError to NULL.
//
// RETURNS:
// The current frequency of the PLL in Hz.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
typedef enum
{
SRC_CLKI,
SRC_PLL
} SrcClkDef;
typedef enum
{
PLLMUXERR_NONE,
PLLMUXERR_INVALID_VALUE,
PLLMUXERR_CLKI_NOT_32768
} PllMuxErrorDef;
UInt32 GetPllMuxOutputFreq( SrcClkDef *pSrcClk, PllMuxErrorDef *pPllMuxError );
//---------------------------------------------------------------------------
// GetI2cClkDivide()
//
// DESCRIPTION:
// This routine reads the I2C Clock Divide.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The I2C Clock Divide.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
int GetI2cClkDivide( void );
//---------------------------------------------------------------------------
// GetI2cClock()
//
// DESCRIPTION:
// This routine calculates the I2C Clock frequency.
//
// PARAMETERS:
// *pSrcClk - Returns SRC_CLKI if CLKI is the source clock.
// Returns SRC_PLL if the Internal PLL is the source clock.
// If this value isn't needed, set pSrcClk to NULL
//
// *pPllMuxError - Returns PLLMUXERROR_NONE if there are no errors.
// Returns PLLMUXERROR_INVALID_VALUES if the PLL registers have invalid values.
// Returns PLLMUXERROR_CLKI_NOT_32768 if CLKI is not configured to 32.768 kHz.
// If this value isn't needed, set pPllMuxError to NULL.
//
// RETURNS:
// The I2C Clock frequency in Hz.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
UInt32 GetI2cClock( SrcClkDef *pSrcClk, PllMuxErrorDef *pPllMuxError );
//---------------------------------------------------------------------------
// GetSystemClkDivide()
//
// DESCRIPTION:
// This routine reads the System Clock Divide.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The System Clock Divide.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
int GetSystemClkDivide( void );
//---------------------------------------------------------------------------
// GetSystemClock()
//
// DESCRIPTION:
// This routine calculates the System Clock frequency.
//
// PARAMETERS:
// *pSrcClk - Returns SRC_CLKI if CLKI is the source clock.
// Returns SRC_PLL if the Internal PLL is the source clock.
// If this value isn't needed, set pSrcClk to NULL
//
// *pPllMuxError - Returns PLLMUXERROR_NONE if there are no errors.
// Returns PLLMUXERROR_INVALID_VALUES if the PLL registers have invalid values.
// Returns PLLMUXERROR_CLKI_NOT_32768 if CLKI is not configured to 32.768 kHz.
// If this value isn't needed, set pPllMuxError to NULL.
//
// RETURNS:
// The System Clock frequency in Hz.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
UInt32 GetSystemClock( SrcClkDef *pSrcClk, PllMuxErrorDef *pPllMuxError );
//---------------------------------------------------------------------------
// GetParallelPanelClkDivide()
//
// DESCRIPTION:
// This routine calculates the Parallel Panel Clock divide.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The Parallel Panel Clock divide.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
UInt32 GetParallelPanelClkDivide( void );
//---------------------------------------------------------------------------
// GetParallelPanelClkFreq()
//
// DESCRIPTION:
// This routine calculates the Parallel Panel Clock frequency.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The Parallel Panel Clock frequency in Hz.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
UInt32 GetParallelPanelClkFreq( void );
//---------------------------------------------------------------------------
// GetSerialLcdClkDivide()
//
// DESCRIPTION:
// This routine calculates the Serial LCD Clock divide.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The Serial LCD Clock divide.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
int GetSerialLcdClkDivide( void );
//---------------------------------------------------------------------------
// GetSerialLcdClkFreq()
//
// DESCRIPTION:
// This routine calculates the Serial LCD Clock frequency.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The Serial LCD Clock frequency in Hz.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
UInt32 GetSerialLcdClkFreq( void );
//---------------------------------------------------------------------------
// GetCameraClkDivide()
//
// DESCRIPTION:
// This routine calculates the Camera Clock divide.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The Camera Clock divide.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
int GetCameraClkDivide( void );
//---------------------------------------------------------------------------
// GetCameraClkOutFreq()
//
// DESCRIPTION:
// This routine calculates the Camera Clock Out frequency.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The Camera Clock Out frequency in Hz.
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
UInt32 GetCameraClkOutFreq( void );
//----------------------------------------------------------------------------
// SetOutputPort()
//
// DESCRIPTION:
// This routine sets the Output Port.
//
// PARAMETERS:
// port: PORT_ALL_OFF - all ports off
// PORT_LCD1 - LCD1
// PORT_LCD2 - LCD2
// PORT_LCD3 - LCD3
//
// RETURNS:
// TRUE if port has been set
// FALSE otherwise
//
// MODIFIES:
// REG[004Ch] bits 1-0
//
//----------------------------------------------------------------------------
Boolean SetOutputPort( OutputPortDef port );
//---------------------------------------------------------------------------
// GetOutputPort()
//
// DESCRIPTION:
// This routine returns the Output Port.
//
// PARAMETERS:
// Nothing.
//
// RETURNS:
// The Output Port, which is one of the following:
// PORT_ALL_OFF - all ports off
// PORT_LCD1 - LCD1
// PORT_LCD2 - LCD2
// PORT_LCD3 - LCD3
//
// MODIFIES:
// Nothing.
//
//---------------------------------------------------------------------------
OutputPortDef GetOutputPort( void );
//----------------------------------------------------------------------------
// SetLutBypassEnable()
//
// DESCRIPTION:
// This routine enables/disables the LUT bypass.
//
// PARAMETERS:
// enable - TRUE to enable the LUT bypass
// - FALSE to disable the LUT bypass
//
// RETURNS:
// Nothing.
//
// MODIFIES:
// REG[004Ch] bit 4
//----------------------------------------------------------------------------
void SetLutBypassEnable( Boolean enable );
//----------------------------------------------------------------------------
// GetLutBypassEnable()
//
// DESCRIPTION:
// This routine determines whether the LUT bypass is enabled.
//
// PARAMETERS:
// None.
//
// RETURNS:
// TRUE if the LUT bypass is enabled.
// FALSE otherwise.
//
// MODIFIES:
// Nothing.
//----------------------------------------------------------------------------
int GetLutBypassEnable( WindowDef Window );
//----------------------------------------------------------------------------
// GetLutMode()
//
// DESCRIPTION:
// This routine determines the LUT1/LUT2 mode.
//
// PARAMETERS:
// None.
//
// RETURNS:
// LUT_ERROR if the mode is not valid.
// LUT_NOBYPASS_8BPP_256COLOR_LUT - LUT not bypassed, 8 bpp, 256 color LUT
// LUT_NOBYPASS_16BPP_565LUT - LUT not bypassed, 16 bpp, 5-6-5 LUT
// LUT_BYPASS_8BPP_332RGB - LUT bypassed, 8 bpp, 3-3-2 RGB pixels
// LUT_BYPASS_16BPP_565RGB - LUT bypassed, 16 bpp, 5-6-5 RGB pixels
//
// MODIFIES:
// Nothing.
//----------------------------------------------------------------------------
UInt32 GetLutMode( WindowDef Window );
//----------------------------------------------------------------------------
// PowerSaveMode()
//
// DESCRIPTION:
// Enable/Disable Power Save Mode
//
// PARAMETERS:
// enable - TRUE to enable Power Save Mode
// FALSE to disable Power Save Mode
//
// RETURNS:
// Nothing.
//
// MODIFIES:
// REG[0018h] bit 0
//----------------------------------------------------------------------------
void PowerSaveMode( Boolean enable );
//---------------------------------------------------------------------------
// FUNCTION: isHostIndirectInterface()
//
// DESCRIPTION:
// This routine checks whether the host bus interface is indirect or not.
//
// PARAMETERS:
// None.
//
// RETURNS:
// TRUE if the host bus interface is of an indirect type.
// FALSE if the host bus interface is of a direct type.
//
// MODIFIES:
// Nothing.
//---------------------------------------------------------------------------
Boolean isHostIndirectInterface( void );
//---------------------------------------------------------------------------
// FUNCTION: clStartOneFrameTransfer()
//
// DESCRIPTION:
// This function can be used to start one frame transfer
// (for parallel/serial LCD interfaces).
//
// PARAMETERS:
// n/a
//
// RETURNS:
// TRUE if Frame Transfer started.
// FALSE if no output port (LCD1, LCD2, or LCD3) is active.
//
// MODIFIES: REG[003Ah]
//---------------------------------------------------------------------------
Boolean clStartOneFrameTransfer( void );
//---------------------------------------------------------------------------
// FUNCTION: SetSwivelViewMode()
//
// DESCRIPTION:
// This routine sets the SwivelView mode for the Main Window
// or Overlay Window.
//
// PARAMETERS:
// window - cl_MAIN_WINDOW or cl_OVERLAY_WINDOW
// mode - The SwivelView mode (0, 90, 180, or 270).
//
// RETURNS:
// Nothing.
//
// MODIFIES:
// REG[024Ah] bits 1-0
//----------------------------------------------------------------------------
void SetSwivelViewMode(WindowDef window, int mode);
//----------------------------------------------------------------------------
// SetWinMirror()
//
// DESCRIPTION:
// Sets the Main Window or Overlay Window Mirror function.
//
// PARAMETERS:
// window - MAIN_WINDOW or PIP_WINDOW
// enable - TRUE to enable mirror
// - FALSE to disable mirror
//
// RETURNS:
// Nothing.
//
// MODIFIES:
// REG[024Ah] bit 2 for SetMainWinMirror()
// REG[024Ah] bit 4 for SetOverlayWinMirror()
//----------------------------------------------------------------------------
void SetWinMirror(WindowDef window, Boolean Enable);
//---------------------------------------------------------------------------
// FUNCTION: SetOverlayEnable()
//
// DESCRIPTION:
// This routine enables or disables the Overlay Window
//
// PARAMETERS:
// Enable - FALSE will disable Overlay.
// - TRUE will enable Overlay.
//
// RETURNS:
// Nothing.
//
// MODIFIES:
// REG[004Ch] bits 6
//---------------------------------------------------------------------------
void SetOverlayEnable(Boolean Enable);
//---------------------------------------------------------------------------
// FUNCTION: SelectHostImage()
//
// DESCRIPTION:
// This bit only needs to be set if the incoming data from the host is to be rotated.
// When this bit =0, the Host output to memory is the main image.
// When this bit =1, the host output to memory is the overlay image (default).
//
// PARAMETERS:
// window -cl_MAIN_WINDOW
// - cl_OVERLAY_WINDOW
//
// RETURNS:
// Nothing.
//
// MODIFIES:
// REG[0248h] bits 4
//---------------------------------------------------------------------------
void SelectHostImage(WindowDef window);
#ifdef __cplusplus
}
#endif
#endif // __CHIPLIB_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?