📄 sdc.h
字号:
//------------------------------------------------------------------------------
//
// Copyright (C) 2004, 2006, Freescale Semiconductor, Inc. All Rights Reserved
// THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
// BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
// FREESCALE SEMICONDUCTOR, INC.
//
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//
// File: sdc_init.h
//
// local header file.
//
//------------------------------------------------------------------------------
#ifdef PLAT_PMC
#include <pmcdisplay.h>
#endif
#include "display_vf.h"
#ifndef __SDC_H__
#define __SDC_H__
#ifdef __cplusplus
extern "C" {
#endif
//------------------------------------------------------------------------------
// Defines
#define SCREEN_PIX_WIDTH 320
#define SCREEN_PIX_HEIGHT 240
#define SCREEN_PIX_WIDTH_VGA 640
#define SCREEN_PIX_HEIGHT_VGA 480
#define DISP_MIN_WIDTH 8
#define DISP_MIN_HEIGHT 8
#define DISP_BPP 16
#define DISP_BYTES_PP (DISP_BPP / 8)
#define LCD_CONTRAST_MIN 0x00000000
#define LCD_CONTRAST_MAX 0x000000FF
#define LCD_CONTRAST_DEFAULT 0x0000007F
#define LCD_CONTRAST_STEP 0x00000001
//-----------------------------------------------------------------------------
// Types
typedef enum DisplayPlaneEnum
{
DisplayPlane_0 = IPU_SDC_COM_CONF_GWSEL_BG,
DisplayPlane_1 = IPU_SDC_COM_CONF_GWSEL_FG
} DisplayPlane;
// RGB Formats
// Additional RGB formats has to be addede here
typedef enum {
IPU_PIX_FMT_RGB666,
IPU_PIX_FMT_RGB565,
IPU_PIX_FMT_RGB24,
}IPU_PIXEL_FORMAT;
// Enumeration of Synchronous (Memory-less) panel types
// add name of a new panel in the following format
// IPU_PANEL_<Name>_TFT
typedef enum {
IPU_PANEL_SAMSUNG_TFT, // Registry value is 0
IPU_PANEL_NEC_TFT, // Registry value is 1
IPU_TV_NTSC, // Registry value is 2
IPU_TV_PAL, // Registry value is 3
// New panel goes here , // Registry value is 4
// New panel goes here , // Registry value is 5
numPanel,
} IPU_PANEL_TYPE;
// Bitfield of Display Interface signal polarities.
typedef struct {
UINT32 DATAMASK_EN:1;
UINT32 CLKIDLE_EN :1;
UINT32 CLKSEL_EN :1;
UINT32 VSYNC_POL :1;
UINT32 ENABLE_POL :1;
UINT32 DATA_POL :1; // true = inverted
UINT32 CLK_POL :1; // true = rising edge
UINT32 HSYNC_POL :1; // true = active high
UINT32 Dummy :24; // Dummy variable for alignment.
} IPU_DI_SIGNAL_CFG;
/*
* Panel Information can be filled as a struct variable to extend the driver
*/
struct PANEL_INFO_ST {
PUCHAR NAME;
IPU_PANEL_TYPE TYPE;
IPU_PIXEL_FORMAT PIXEL_FMT;
INT WIDTH;
INT HEIGHT;
INT VSYNCWIDTH;
INT VSTARTWIDTH;
INT VENDWIDTH;
INT HSYNCWIDTH;
INT HSTARTWIDTH;
INT HENDWIDTH;
IPU_DI_SIGNAL_CFG SIG_POL;
};
typedef struct PANEL_INFO_ST PANEL_INFO;
//------------------------------------------------------------------------------
// Functions
UINT32 InitializeSDC(PANEL_INFO *currentPanel, int bpp);
void EnableSDC(void);
void DisableSDC(void);
void BackgroundSetSrcBuffer(PHYSICAL_ADDRESS *pAddr);
BOOL ForegroundWindowConfig(PDISPLAY_SDC_FG_CONFIG_DATA pDispConfigData);
void ForegroundWindowSetOffset(POINT *ptWinOffset);
void ForegroundWindowSetSrcBuffer(PHYSICAL_ADDRESS *pAddr);
void ForegroundWindowRestore();
void ForegroundWindowEnable();
BOOL ForegroundWindowDisable();
BOOL DisplayPlaneIsBusy(DisplayPlane dispPlane);
void DisplayPlaneWaitForNotBusy(DisplayPlane dispPlane);
BOOL PeekandPoke(PDEBUG_INFO pvIn);
#ifdef __cplusplus
}
#endif
#endif // __SDC_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -