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

📄 main.h

📁 嵌入式编程
💻 H
字号:

#ifndef _MAIN_H
#define _MAIN_H
#include "710defs.h"
#define EBI_EXT0_VALUE  0xF0078003
#define EBILED_ADDRESS  0x78000000


/*************************************
* 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;
/******************************/

typedef struct 
{
	unsigned int StartX;
	unsigned int StartY;
	unsigned int LibPlace;
	unsigned short Color;
	unsigned char * LetterChar;
	unsigned char * LCDBuffer;
} LCDShowParameter;

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 LetterGet(PUINT8 LetterChar, PUINT8 PBuffer, U32 LibPlace);
extern void LetterConvert(PUINT8 LPBuffer, PUINT8 LetterBuffer, U16 Color);
extern void LetterShow(U32 LetterX, U32 LetterY, PUINT8 LetterBuffer, PUINT8 LCDBuffer);

extern void StringShow(LCDShowParameter LCDShowPara);

extern void LCDOutputShow(LCDShowParameter LCDShowPara, U32 NUM);

extern void Delay(U32 t);

extern void KPIInit(void);
extern U8 Receive_data[256];
extern U8 Trans_data[256];
extern U32 g_Led1;

extern void EBILedInit(U8 Value);
extern void EBILedSet(U8 Value); 
extern void USIInit(void);
extern void Delay(U32 t);
extern U8 USICheckBusy(void);
extern void USIWriteEnable(void);
extern void USIRead(U32 R_addr,U8 *Read_buff);
extern void USIWrite(U32 W_addr, U8 *W_buff);
extern void USIRead_ID(void);
extern void USISectorErease(U32 Erea_addr);
extern void USIWriteDisable(void);
extern int c;
extern U8 shuru;
extern U8 a[6];
extern U8 b[6];
extern int p;
//extern char BlackBoard;
#endif

⌨️ 快捷键说明

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