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

📄 main.h

📁 嵌入式编程
💻 H
字号:
#ifndef _MAIN_H_
#define _MAIN_H_
#include "710defs.h"
/*************************************
* LCD_IMAGE_T 
* Structure for image width and height 
*************************************/
typedef struct 
{
	unsigned int width;
	unsigned int height;
} LCD_IMAGE_T;

/************************************* 
* LCD_LOCATION_T
* Structure for location of image at panel 
*************************************/
typedef struct 
{
	unsigned int StartX;
	unsigned int StartY;
	unsigned int EndX;
	unsigned int EndY;
} LCD_LOCATION_T;

/**************************************
* LCD_DOWNSCALING_T
* Sturcture for image down-scaling function
*   hor_n : Horizontal n value
*   hor_m : Horizontal m value
*   ver_n : Vertical n value
*   ver_m : Vertical m value
*   
* Horizontal down-scaling ratio : n/m
* Vertical down-scaling ratio : n/m
*************************************/   
typedef struct 
{
	unsigned int hor_n;
	unsigned int hor_m;
	unsigned int ver_n;
	unsigned int ver_m;
} LCD_DOWNSCALING_T;

/**************************************
* LCD_CROPPINGWINDOW_T
* Sturcture for image cropping window function
*	window_x : cropping window x position
*	window_y : cropping window y position
*	winodw_width : cropping window width
*	window_height : cropping window height
*************************************/ 
typedef struct 
{
	unsigned int window_x;
	unsigned int window_y;
	unsigned int window_width;
	unsigned int window_height;
} LCD_CROPPINGWINDOW_T;


/***********************************
* Structure for Look-up Table
* copy from microwindows /include/inc/linux/fb.h */
typedef struct 
{
	int start;				/* First entry	*/
	int len;				/* Number of entries */
	unsigned short *red;				/* Red values	*/
	unsigned short *green;
	unsigned short *blue;
	short *transp;			/* transparency, can be NULL */
}LCD_PALETTE_T;
/******************************/

extern void LCDInit(void);
extern void LCDShow(LCD_IMAGE_T Size, LCD_LOCATION_T Location);
extern void LCDFIFOBufferSet(PUINT8 Buffer);
extern void LCDDisplayOn(void);
extern void LCDDisplayOff(void);

extern void LCDDotOne(U32 x, U32 y, PUINT8 Buffer);
extern void LCDLine(U32 x1, U32 y1, U32 x2, U32 y2, PUINT8 LBuffer);
extern void LCDCircle(U32 x_center, U32 y_center, U32 radius, PUINT8 CBuffer);

extern void LetterConvert(PUINT8 LetterMode, PUINT8 LetterBuffer);
extern void LetterShow(U32 LetterX, U32 LetterY, PUINT8 LetterBuffer, PUINT8 LCDBuffer);

extern void Delay(U32 t);


#endif

⌨️ 快捷键说明

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