📄 lh7a404_clcdc_driver.h
字号:
/***********************************************************************
* $Workfile: lh7a404_clcdc_driver.h $
* $Revision: 1.2 $
* $Author: WellsK $
* $Date: Mar 29 2004 14:31:50 $
*
* Project: LH7A404 CLCDC driver
*
* Description:
* This file contains driver support for the CLCDC module on the
* LH7A404
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/csps/lh7a404/include/lh7a404_clcdc_driver.h-arc $
*
* Rev 1.2 Mar 29 2004 14:31:50 WellsK
* Added LCD_PICK_INT and LCD_CLEAR_INT ioctl functions.
*
* Rev 1.1 Oct 28 2003 10:48:50 WellsK
* Updated with structure from ABL package. Added ioctl for
* setting color depth.
*
* Rev 1.0 Jun 30 2003 17:11:58 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) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
* CAMAS, WA
**********************************************************************/
#ifndef LH7A404_CLCDC_DRIVER_H
#define LH7A404_CLCDC_DRIVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "abl_lcd_params.h"
#include "lh7a404_clcdc.h"
/***********************************************************************
* CLCDC device configuration commands (IOCTL commands and arguments)
**********************************************************************/
/* CLCDC device commands (IOCTL commands) */
typedef enum {
LCD_CONFIG, /* Configure the LCD controller with a predefined
LCD configuration structure, use arg as the
pointer to the structure */
LCD_ENABLE, /* Enable or disable LCD controller, use arg = 0
to disable, arg = 1 to enable */
LCD_PWENABLE, /* Enable or disable LCD power, use arg = 0
to disable, arg = 1 to enable */
LCD_SET_UP_FB, /* Set upper frame buffer address, use arg as
the address of the frame buffer */
LCD_SET_LW_FB, /* Set lower frame buffer address, use arg as
the address of the frame buffer */
LCD_SET_OV_FB, /* Set overflow frame buffer address, use arg as
the address of the frame buffer */
LCD_ENABLE_INTS, /* Enable LCD interrupts, use arg as an 'OR'ed
combination of CLCDC_LCDSTATUS_FUFUP,
CLCDC_LCDSTATUS_FUFLP, CLCDC_LCDSTATUS_LNBU,
CLCDC_LCDSTATUS_VCOMP, and
CLCDC_LCDSTATUS_MBERROR */
LCD_DISABLE_INTS, /* Disable LCD interrupts, use arg as an 'OR'ed
combination of CLCDC_LCDSTATUS_FUFUP,
CLCDC_LCDSTATUS_FUFLP, CLCDC_LCDSTATUS_LNBU,
CLCDC_LCDSTATUS_VCOMP, and
CLCDC_LCDSTATUS_MBERROR */
LCD_PICK_INT, /* Select the interrupt condition that generates
the CLCDC_LCDSTATUS_VCOMP interrupt, use arg as
a type of LCD_INTERRUPT_T */
LCD_CLEAR_INT, /* Clear the latched LCD interrupt condition, use
arg = 0 */
LCD_DMA_ON_4MT, /* Set DMA requests to start when 4 or 8 entries
are free in the CLCDC FIFOs, use arg = 1 for
4 entries, use arg = 0 for 8 entries */
LCD_SWAP_RGB, /* Swaps the red and green colors in a 16-bit
color value (555 displays only), use arg = 1 to
swap red and green, use arg = 0 to not swap */
LCD_SET_BPP, /* Set bits per pixel, arg must be 1, 2, 4, 8, or
16 */
LCD_SET_CLOCK, /* Sets or updates the LCD pixel clock, use arg as
a new clock rate in Hz */
LCD_GET_STATUS /* Get an LCD status, use an argument type of
LCD_IOCTL_STS_T as the argument to return the
correct status */
} LCD_IOCTL_CMD_T;
/* CLCDC arguments for LCD_PICK_INT command (IOCTL arguments) */
typedef enum {
VSYNC_START = 0, /* Interrupt on start of VSYNC */
BACK_PORCH_START, /* Interrupt on start of vertical back porch */
VIDEO_START, /* Interrupt on start of video */
FRONT_PORCH_START /* Interrupt on start of vertical front porch */
} LCD_INTERRUPT_T;
/* CLCDC device arguments for LCD_GET_STATUS command (IOCTL
arguments) */
typedef enum {
LCD_ENABLE_ST, /* Returns LCD enabled status (1 = enabled, 0
= disabled */
LCD_PWENABLE_ST, /* Returns LCD power enabled status (1 = enabled,
0 = disabled */
LCD_UP_FB, /* Returns address of primary (upper) frame
buffer */
LCD_LW_FB, /* Returns address of lower panel buffer (dual panel
display mode only) */
LCD_OVR_FB, /* Returns address of overflow buffer */
LCD_PANEL_TYPE, /* Returns the LCD type, an enumeration of type
LCD_PANEL_T */
LCD_CLOCK, /* Returns the pixel clock in Hz */
LCD_XSIZE, /* Returns the display horizontal size in pixels */
LCD_YSIZE, /* Returns the display certical size in pixels */
LCD_COLOR_DEPTH /* Returns the display color depth, either 1, 2, 4
8, or 16 bits per pixel */
} LCD_IOCTL_STS_T;
/***********************************************************************
* CLCDC driver API functions
**********************************************************************/
/* Open the LCD */
INT_32 lcd_open(void *ipbase, INT_32 arg);
/* Close the LCD */
STATUS lcd_close(INT_32 devid);
/* LCD configuration block */
STATUS lcd_ioctl(INT_32 devid,
INT_32 cmd,
INT_32 arg);
/* LCD read function (stub only) */
INT_32 lcd_read(INT_32 devid,
void *buffer,
INT_32 max_bytes);
/* LCD write function (stub only) */
INT_32 lcd_write(INT_32 devid,
void *buffer,
INT_32 n_bytes);
#ifdef __cplusplus
}
#endif
#endif /* LH7A404_CLCDC_DRIVER_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -