📄 lcd_plat.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
//
// (C) Copyright 2006 Marvell International Ltd.
// All Rights Reserved
//
/******************************************************************************
**
** COPYRIGHT (C) 2004 Intel Corporation.
**
** This software as well as the software described in it is furnished under
** license and may only be used or copied in accordance with the terms of the
** license. The information in this file is furnished for informational use
** only, is subject to change without notice, and should not be construed as
** a commitment by Intel Corporation. Intel Corporation assumes no
** responsibility or liability for any errors or inaccuracies that may appear
** in this document or any software that may be provided in association with
** this document.
** Except as permitted by such license, no part of this document may be
** reproduced, stored in a retrieval system, or transmitted in any form or by
** any means without the express written consent of Intel Corporation.
**
*******************************************************************************/
#ifndef __LCD_PLAT_H__
#define __LCD_PLAT_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "pxa_lcd.h"
#include "BSP_CommonDefs.h"
typedef enum
{
CursorOff=0,
CursorOn=1,
CursorBusy=2
} CURSOR_STATUS_T;
typedef struct lcd_s
{
PXA_STATUS_T (*init)(struct lcd_s *lcd, UINT32 base_phy);
void (*resume)(struct lcd_s *lcd);
void (*suspend)(struct lcd_s *lcd);
void (*flip)(struct lcd_s *lcd, UINT32 frame_phy_addr);
PXA_STATUS_T (*overlay1_enable)(struct lcd_s *lcd, overlay_t *overlay, UINT32 phy_addrs);
PXA_STATUS_T (*overlay1_dyn_change)(struct lcd_s *lcd, overlay_t *overlay, UINT32 phy_addrs, overlay_change_flag_t change_flag);
void (*overlay1_disable)(struct lcd_s *lcd);
PXA_STATUS_T (*overlay2_enable)(struct lcd_s *lcd, overlay_t *overlay, UINT32 phy_addrs[3]);
PXA_STATUS_T (*overlay2_dyn_change)(struct lcd_s *lcd, overlay_t *overlay, UINT32 phy_addrs[3], overlay_change_flag_t change_flag);
void (*overlay2_disable)(struct lcd_s *lcd);
void (*cursor_set_shape)(struct lcd_s *lcd, UINT8 *mask, UINT8 *palette, int xHot, int yHot, int x, int y );
void (*cursor_move)(struct lcd_s *lcd, int x, int y );
void (*cursor_on)(struct lcd_s *lcd, BOOL on_off );
} lcd_t;
typedef struct active_panel_s
{
void (*set_power_mode) (struct active_panel_s *lcd, UINT32 power_mode);
PXA_STATUS_T (*init) (struct active_panel_s *lcd);
PXA_STATUS_T (*post_init) (struct active_panel_s *lcd);
active_config_t config;
} active_panel_t;
typedef struct active_cursor_s
{
int x;
int y;
int cX;
int cY;
int xHot;
int yHot;
UINT8 *cursor_buf;
UINT8 *palette_buf;
CURSOR_STATUS_T status;
int mode;
} active_cursor_t;
typedef struct active_lcd_s
{
lcd_t base;
// UINT32 *clk_regs;
lcd_registers_t *lcd_regs;
UINT32 bpp;
lcd_dma_descriptor_t *dma_descs;
active_panel_t *panel;
active_cursor_t cursor;
} active_lcd_t;
BOOL LCDPanelSelect(void** panel);
lcd_t *ActiveCreate(active_panel_t* panel);
#if 0
typedef struct
{
UINT32 *clk_regs;
UINT32 *lcd_regs;
UINT32 bpp;
lcd_dma_descriptor_t *dma_descs;
// Fields for internal use. Need no initialization by user.
// The following are init by panel init or switch codes.
// smart panel or tft panel
lcd_panel_t *panel;
struct
{
UINT16 *buf;
UINT32 cmd_max;
UINT16 *cmd_current;
} cmd_buf;
overlay_t *overlay2;
} smart_lcd_t;
typedef struct
{
XLLP_LCD_PANEL_TYPE type;
UINT32 width;
UINT32 height;
void (*set_power_mode) (struct XLLP_LCD_S *pXllpLCD, UINT32 power_mode);
UINT32 update_width;
UINT32 update_height;
void (*reset_panel) (struct XLLP_LCD_S *pXllpLCD);
XLLP_STATUS_T (*init_pins) (struct XLLP_LCD_S *pXllpLCD);
void (*init_cmd) (struct XLLP_LCD_S *pXllpLCD);
void (*write_ram_cmd) (struct LCD_S *pXllpLCD);
void (*power_mode_cmd) (struct LCD_S *pXllpLCD, UINT32 power_mode);
void (*set_update_area) (struct LCD_S *pXllpLCD,
UINT32 x1, UINT32 y1,
UINT32 x2, UINT32 y2);
smart_timing_t timing;
} smart_panel_t;
#endif
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -