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

📄 lh7a400_clcdc_driver.h

📁 sharp的arm920t 7A400的评估板附带光盘Sharp KEVLH7A400 v0.3b Welcome to the SHARP KEV7A400 Evaluation board
💻 H
字号:
/**********************************************************************
 *	$Workfile:   LH7A400_CLCDC_driver.h  $
 *	$Revision:   1.4  $
 *	$Author:   KovitzP  $
 *	$Date:   Jan 09 2002 10:51:10  $
 *
 *	Project: LH7A400
 *
 *	Description:
 *   LH7A400 Color LCD Controller device driver header file
 *
 *	Revision History:
 *	$Log:   P:/PVCS6_6/archives/LH7A400 (Aruba)/LCD/LH7A400_CLCDC_driver.h-arc  $
 * 
 *    Rev 1.4   Jan 09 2002 10:51:10   KovitzP
 * added bits per pixel functions
 * 
 *    Rev 1.3   Jan 09 2002 09:22:10   KovitzP
 * Added a number of functions. Changed the prefix of function
 * calls from clcdc to lcd because function calls use both the
 * CLCDC and the LCDICP; together, these IP blocks make up
 * the LCD controller system.
 * 
 *    Rev 1.2   Jan 07 2002 12:06:46   MaysR
 * Added support for LM057QCTT03 and LM5Q321 CSTN displays.
 *
 *    Rev 1.1   Nov 08 2001 18:14:58   SuryanG
 * No code change. Added file banner.
 *
 *
 *    Rev 1.0   Aug 13 2001 10:22:34   StokerD
 * Initial revision.
 *
 *	COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
 *		CAMAS, WA
 *********************************************************************/

/*
   This file contains the defines for the various LCD displays controlled
   by the LH7A400. When a new display is added, the following steps have
   to be performed:
      1. Define all the constants using one of the display settings below
         as a template.
      2. Add the name of the new display to the display_type_t enumerated type
         at the end of the list and equate it to the value set on the dip switch
         Ensure that the enumerated type value and the dip switch settings are
         the same, otherwise, the initialization function will return an error.
      3. Add the corresponding constants into the lcd_settings structure.
      4. Pass the display type as a parameter to clcdc_init() function from
         your application first in code.

*/

#ifndef LH7A400_CLCDC_DRIVER_H
#define LH7A400_CLCDC_DRIVER_H

#ifdef __cplusplus
#if __cplusplus
extern "C"
{
#endif
#endif

/*
Include files
*/
#include "LH7A400_map.h"

#if !defined(NULL)
#define NULL ((void *) 0)
#endif

#define IMAGE_BUFFER_PHY_BASE    (0xC0000000)

#define MAX_PAL_ENTRY   (128)

typedef enum
{
   DISP_LQ039Q2DS53,
   DISP_LQ057Q3DC02,
   DISP_LQ121S1DG31,
   DISP_LM057QCTT03,
   DISP_LM5Q321,
   MAX_DISPLAY
} display_type_t;

typedef struct
{
//   const UNS_16 *bmp;
   const UNS_8 *bmp;
   UNS_32 bpp;
   UNS_32 *pal;
}bitmaps_t;

/*
   timing2 should be defined without the PCD or BCD fields set. These will
   be calculated in run-time based on the clock frequency.
   ctrl should be defined without power enabled and without BPP defined. Bits
   per pixel will be computed from the image at run-time.
*/

typedef struct
{
   UNS_32   timing0;
   UNS_32   timing1;
   UNS_32   timing2;
   UNS_32   timing3;
   UNS_32   intrenable;
   UNS_32   ctrl;
   UNS_32   lcdicp_ctrl;
   UNS_32   lcdicp_setup;
   UNS_32   lcdicp_timing1;
   UNS_32   lcdicp_timing2;
   UNS_32   min_clk;
   UNS_32   max_clk;
   UNS_32   typ_clk;
}lcd_settings_t;


typedef struct
{
    UNS_32 Rl:5;
    UNS_32 Gl:5;
    UNS_32 Bl:5;
    UNS_32 Il:1;
    UNS_32 Ru:5;
    UNS_32 Gu:5;
    UNS_32 Bu:5;
    UNS_32 Iu:1;
}palette_entry_t;

extern lcd_settings_t lcd_settings[];

INT_32 lcd_init(display_type_t lcd_type);
INT_32 lcd_auto_init(void);
INT_32 lcd_draw(void *bitmap, UNS_32 bpp, UNS_32 *palette);
void lcd_on (display_type_t lcd_type);
void lcd_off (display_type_t lcd_type);
void lcd_setup_lpoverflow(void *lpovflowbase);
INT_32 lcd_display_width(void);
INT_32 lcd_display_height(void);
INT_32 lcd_display_is_tft(void);
INT_32 lcd_display_is_hrtft(void);
INT_32 lcd_display_is_stn(void);
INT_32 lcd_display_is_mono(void);
INT_32 lcd_display_is_dual_panel(void);
display_type_t lcd_read_display_type(void);
void lcd_display_frame_buffer(void *frame_buffer);
void lcd_load_palette(void *pal, UNS_32 size);
INT_32 lcd_set_bits_per_pixel(INT_32 bpp);
INT_32 lcd_get_bits_per_pixel(void);
display_type_t lcd_read_display_type(void);
void lcd_color_rgb(void);
void lcd_color_bgr(void);
INT_32 lcd_set_bits_per_pixel(INT_32 bpp);
INT_32 lcd_get_bits_per_pixel(void);


#ifdef __cplusplus
#if __cplusplus
} /* extern "C" */
#endif
#endif

#endif /*LH7A400_CLCDC_DRIVER_H*/

⌨️ 快捷键说明

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