lcd.h

来自「Keil下的uCOSII+GUI+LCD程序代码实例」· C头文件 代码 · 共 52 行

H
52
字号
#ifndef __LCD_H
#define __LCD_H

#include "type.h"

#define LcdDataClk		9
#define LcdDataSet		25	  	//ns
#define LcdDataHld		25		//ns
#define LcdHPeriod		525		//Clock
#define LcdVPeriod		286		//Line	

typedef enum {
    TFT = 0,      /* standard TFT */
    ADTFT,        /* advanced TFT */
    HRTFT,        /* highly reflective TFT */
    MONO_4BIT,    /* 4-bit mono */
    MONO_8BIT,    /* 8-bit mono */
    CSTN          /* color STN */
} LCD_PANEL_T;


/* Structure containing the parameters for the LCD panel */
typedef struct {
    BYTE           h_back_porch;         /* Horizontal back porch in clocks */
    BYTE           h_front_porch;        /* Horizontal front porch in clocks */
    BYTE           h_sync_pulse_width;   /* HSYNC pulse width in clocks */
    WORD          pixels_per_line;      /* Pixels per line (horizontal resolution) */
    BYTE           v_back_porch;         /* Vertical back porch in clocks */
    BYTE           v_front_porch;        /* Vertical front porch in clocks */
    BYTE           v_sync_pulse_width;   /* VSYNC pulse width in clocks */
    WORD          lines_per_panel;      /* Lines per panel (vertical resolution) */
    BYTE           invert_output_enable; /* Invert output enable, 1 = invert*/
    BYTE           invert_panel_clock;   /* Invert panel clock, 1 = invert*/
    BYTE           invert_hsync;         /* Invert HSYNC, 1 = invert */
    BYTE           invert_vsync;         /* Invert VSYNC, 1 = invert */
    BYTE           ac_bias_frequency;    /* AC bias frequency in clocks */
    BYTE           bits_per_pixel;       /* Maximum bits per pixel the display supports */
    DWORD          optimal_clock;        /* Optimal clock rate (Hz) */
    LCD_PANEL_T     lcd_panel_type;       /* LCD panel type */
    BYTE           dual_panel;           /* Dual panel, 1 = dual panel display */
} LCD_PARAM_T;

/* Sharp LQ035 portrait mode ADTFT display */
extern const LCD_PARAM_T sharp_lq035_portrait;

/* Sharp LQ035 landscape mode ADTFT display */
extern const LCD_PARAM_T sharp_lq035_landscape;

extern void lcd_configure_gpio( void);

#endif

⌨️ 快捷键说明

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