📄 sma_lcd_driver.h
字号:
/**********************************************************************
* $Workfile: SMA_lcd_driver.h $
* $Revision: 1.1 $
* $Author: WellsK $
* $Date: Aug 30 2002 13:21:26 $
*
* Project: Common LCD driver interface
*
* Description:
* This package provides a common LCD driver interface. The interface
* uses an common API that doesn't change for a specific LCD type.
* The following functions are supported:
* Initialization of LCD controller (for a display type)
* Setting the backlight intensity
* Disabling the LCD controller (and backlight)
* Re-enabling the LCD controller (and backlight)
* Set the framebuffer location
* Set the 8-bit to 16-bit palette
*
* Additional LCD panel configurations can easily be added to the
* driver by creating a new header file with the LCD controller
* parameters for the panel. Any of the common LCD functions can also
* be over-rided via the common API by replacing the indirect call
* routine for the function.
*
* For connection information to the EVB for each panel type, see
* the associated header file for the panel configuration data.
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/CHIPS/archives/SOC/Source/Universal Drivers/LCD/SMA_lcd_driver.h-arc $
*
* Rev 1.1 Aug 30 2002 13:21:26 WellsK
* Corrected C/C++ wrapper.
*
* Rev 1.0 Aug 28 2002 13:29:26 WellsK
* Initial revision.
*
*
* SHARP MICROELECTRONICS OF THE AMERICAS MAKES NO REPRESENTATION
* OR WARRANTIES WITH RESPECT TO THE PERFORMANCE OF THIS SOFTWARE,
* AND SPECIFICALLY DISCLAIMS ANY RESPONSIBILITY FOR ANY DAMAGES,
* SPECIAL OR CONSEQUENTIAL, CONNECTED WITH THE USE OF THIS SOFTWARE.
*
* SHARP MICROELECTRONICS OF THE AMERICAS PROVIDES THIS SOFTWARE SOLELY
* FOR THE PURPOSE OF SOFTWARE DEVELOPMENT INCORPORATING THE USE OF A
* SHARP MICROCONTROLLER OR SYSTEM-ON-CHIP PRODUCT. USE OF THIS SOURCE
* FILE IMPLIES ACCEPTANCE OF THESE CONDITIONS.
*
* COPYRIGHT (C) 2002 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
* CAMAS, WA
*********************************************************************/
#ifndef LCD_COMMON_H
#define LCD_COMMON_H
#ifdef __cplusplus
#if __cplusplus
extern "C"
{
#endif // __cplusplus
#endif // __cplusplus
#include "SMA_types.h"
//*********************************************************************
// Package types
//*********************************************************************
//typedef void (*lvvfunc) (void);
typedef void (*lvafunc) (void *);
typedef void (*lvufunc) (UNS_16);
typedef void (*lvupfunc) (UNS_16 *);
typedef void (*lvulpfunc) (UNS_32);
// This structure is used to store information about a specific LCD
// panel driver
typedef struct
{
INT_16 xsize; // Horizontal pixel size of display
INT_16 ysize; // Vertical pixel size of display
INT_16 bpp; // Bits per pixel for the display (1/2/4/8/16)
INT_16 max_intens; // Maximum intens value for backlight (0 = off)
INT_16 palette; // Palette use flag - if set, 16 data lines are
// used when in 8-bit color mode
UNS_32 opt_clk; // Optimal pixel clock speed
UNS_32 t0; // Timing 0 configuration value
UNS_32 t1; // Timing 1 configuration value
UNS_32 t2; // Timing 2 configuration value
UNS_32 t3; // Timing 3 configuration value
UNS_32 control; // Control register value
UNS_32 hr_setup; // HR-TFT setup register value
UNS_32 hr_control; // HR-TFT control register value
UNS_32 hr_t1; // HR-TFT timing 1 value
UNS_32 hr_t2; // HR-TFT timing 2 value
lvafunc init; // Pointer to initialization func
lvufunc backintens;// Pointer to backlight intensity control func
lvufunc disenab; // Pointer to lcd disable/enable control func
lvafunc setfb; // Pointer to framebuffer 'set' control func
lvupfunc setpal; // Pointer to palette 'set' control func
lvulpfunc uppixclk;// Pointer to palette 'set' control func
} lcd_configuration_type;
//**********************************************************************
// Global data - this data is made available to other functions that
// may override the basic functions.
//**********************************************************************
// Pointer to panel data structure
extern lcd_configuration_type *panel_data;
//*********************************************************************
// Common API functions
//*********************************************************************
// Initialize the LCD controller for a specific panel type
void lcd_initialize (lcd_configuration_type *panel_sel, void *fb_addr);
// Set the backlight intensity (0 = off)
void lcd_set_backlight_intens (UNS_16 intens);
// Disable or enable the LCD controller
void lcd_disable_enable (UNS_16 off_on);
// Set or reset the frame buffer location
void lcd_set_framebuffer (void *fb_addr);
// Configure the palette
void lcd_set_palette (UNS_16 *palette);
// Return the horizontal pixel resolution of the selected display
INT_16 lcd_get_xsize (void);
// Return the vertical pixel resolution of the selected display
INT_16 lcd_get_ysize (void);
// Return the bits per pixel (colors) of the selected display
INT_16 lcd_get_bpp (void);
// Get maximum backlight intensity
INT_16 lcd_get_max_intens (void);
// Update pixel clock rate
void lcd_update_pixel_clock (void);
#ifdef __cplusplus
}
#endif
#endif // LH7A400_LCD_COMMON_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -