yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 1 | /***********************************************************************
|
| 2 | * Copyright (C) 2014, ZTE Corporation.
|
| 3 | *
|
| 4 | * File Name: drvs_io_lcd.h
|
| 5 | * File Mark:
|
| 6 | * Description: lcd define.
|
| 7 | * Others:
|
| 8 | * Version: 1.0
|
| 9 | * Author: YinWenguan
|
| 10 | * Date: 2014-11-11
|
| 11 | *
|
| 12 | * History 1:
|
| 13 | * Date:
|
| 14 | * Version:
|
| 15 | * Author:
|
| 16 | * Modification:
|
| 17 |
|
| 18 | * History 2:
|
| 19 | **********************************************************************/
|
| 20 |
|
| 21 | #ifndef _DRVS_IO_LCD_H_
|
| 22 | #define _DRVS_IO_LCD_H_
|
| 23 | #include "drvs_vou.h"
|
| 24 | #include "drvs_vou_ref.h"
|
| 25 |
|
| 26 | /*************************************************************************
|
| 27 | * Include files *
|
| 28 | *************************************************************************/
|
| 29 |
|
| 30 |
|
| 31 | /*************************************************************************
|
| 32 | * Macro *
|
| 33 | *************************************************************************/
|
| 34 |
|
| 35 | /**************************************************************************
|
| 36 | * Types *
|
| 37 | **************************************************************************/
|
| 38 | typedef enum
|
| 39 | {
|
| 40 | LCD_DCX_CMD = 0, // µÍµçƽÃüÁî
|
| 41 | LCD_DCX_DATA, // ¸ßµçƽ²ÎÊý»òÊý¾Ý
|
| 42 |
|
| 43 | MAX_LCD_DCX_TYPE
|
| 44 | } T_ZDrvLcd_DcxType; // transmission byte type
|
| 45 |
|
| 46 | typedef enum
|
| 47 | {
|
| 48 | LCD_XFER_POLL = 0, // ÂÖѯ·½Ê½
|
| 49 | LCD_XFER_INT, // ÖжϷ½Ê½
|
| 50 | LCD_XFER_DMA, // DMA·½Ê½
|
| 51 | LCD_XFER_CPU,
|
| 52 |
|
| 53 | MAX_LCD_XFER_TYPE
|
| 54 | } T_ZDrvLcd_XferType;
|
| 55 |
|
| 56 | /* lcd mode */
|
| 57 | typedef enum
|
| 58 | {
|
| 59 | LCD_NORMAL, /* normal mode */
|
| 60 | LCD_SLEEP, /* sleep mode */
|
| 61 |
|
| 62 | MAX_LCD_MODE
|
| 63 | } T_ZDrvLcd_Mode;
|
| 64 |
|
| 65 | /* lcd instance */
|
| 66 | typedef struct
|
| 67 | {
|
| 68 | BOOL bOpen; /* status: open, close */
|
| 69 | T_ZDrvLcd_Mode eMode; /* working mode: normal, sleep */
|
| 70 | T_ZDrvLcd_XferType eXferType; /* poll, interrupt or DMA */
|
| 71 | T_ZDrvLcd_DcxType eDcxType; /* command or parameter/data */
|
| 72 | ZOSS_MUTEX_ID mutexUpdate; /* mutex for updating rectangle */
|
| 73 | ZOSS_SEMAPHORE_ID semDmaInt; /* semaphore for DMA transimision */
|
| 74 | } T_ZDrvLcd_Instance;
|
| 75 |
|
| 76 | #if IOKEYS(IOCTL_LCD_UPDATE)
|
| 77 | typedef struct
|
| 78 | {
|
| 79 | UINT16 uiLeft;
|
| 80 | UINT16 uiTop;
|
| 81 | UINT16 uiWidth;
|
| 82 | UINT16 uiHeight;
|
| 83 | UINT8* pBuf;
|
| 84 | } T_ZDrvLcd_DisplayParam;
|
| 85 | #endif
|
| 86 |
|
| 87 | #if IOKEYS(IOCTL_LCD_SLEEP)
|
| 88 | typedef enum
|
| 89 | {
|
| 90 | LCD_SLEEP_OUT = 0,
|
| 91 | LCD_SLEEP_IN,
|
| 92 |
|
| 93 | } T_ZDrvLcd_SleepStatus;
|
| 94 | #endif
|
| 95 |
|
| 96 | #if IOKEYS(IOCTL_LCD_BACKLIGHT)
|
| 97 | typedef enum
|
| 98 | {
|
| 99 | LCD_BACKLIGHT_OFF = 0,
|
| 100 | LCD_BACKLIGHT_ON,
|
| 101 |
|
| 102 | } T_ZDrvLcd_BacklightStatus;
|
| 103 | #endif
|
| 104 |
|
| 105 | #if IOKEYS(IOCTL_LCD_BRIGHTNESS)
|
| 106 | typedef unsigned int T_ZDrvLcd_Brightness; /* [0, 255]: 0 - darkest; 255 - brightest */
|
| 107 | #endif
|
| 108 |
|
| 109 | #if IOKEYS(IOCTL_LCD_GET_INFO)
|
| 110 | typedef struct
|
| 111 | {
|
| 112 | UINT16 width;
|
| 113 | UINT16 height;
|
| 114 | UINT16 bitsPerPixel;
|
| 115 | UINT16 rMask;
|
| 116 | UINT16 gMask;
|
| 117 | UINT16 bMask;
|
| 118 | UINT16 lcd_pow_st;
|
| 119 | UINT16 lcd_pix_st;
|
| 120 | T_ZDrvLcd_Instance instance;
|
| 121 | T_ZDrvLcd_BacklightStatus backlight;
|
| 122 | T_ZDrvLcd_Brightness brightness;
|
| 123 |
|
| 124 | } T_ZDrvLcd_Info;
|
| 125 |
|
| 126 | typedef struct
|
| 127 | {
|
| 128 | T_ZDrv_OSDInfo *OSD_Info;
|
| 129 | T_ZDrvLcd_Info *Lcd_Info;
|
| 130 |
|
| 131 | }T_ZDrv_LCDVOUInfo;
|
| 132 |
|
| 133 | #endif
|
| 134 |
|
| 135 | #endif
|