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

📄 head.h

📁 基于ARM核的HMS7202
💻 H
字号:
#include <stdio.h>
#include <stdlib.h>
#include <mon.h>
#include <reg7202.h>
#include <tty.h>
#include <syscall.h>
#include <dma_mem.h>
#include "def.h"
#include "letterlib.c"
//#include "hzlib.c"



#define dot_draw( x, y, color)	 \
				*( (unsigned short*) (LCDSdramBase + y*LCDx_bpp_res + x) ) = color;

unsigned short *LCDSdramBase;
unsigned long *pVideoControl  = (unsigned long *)(Videobase);
unsigned long *pLcdStatus	  =	(unsigned long *)(Videobase + 0x04);	// LCD status Register
unsigned long *pLcdSMask	  = (unsigned long *)(Videobase + 0x08);	// LCD mask Mask Register
unsigned long *pLcdInt		  =	(unsigned long *)(Videobase + 0x0c);	// LCD Interrupt Register
unsigned long *pLcdDBAR		  =	(unsigned long *)(Videobase + 0x10);	// LCD DMA channel Base Address Register
unsigned long *pLcdDCAR		  =	(unsigned long *)(Videobase + 0x14);	// LCD DMA channel Current Address Register
unsigned long *pLcdTiming0	  =	(unsigned long *)(Videobase + 0x20);	// LCD Timing 0 Register
unsigned long *pLcdTiming1	  =	(unsigned long *)(Videobase + 0x24);	// LCD Timing 1 Register
unsigned long *pLcdTiming2	  =	(unsigned long *)(Videobase + 0x28);	// LCD Timing2 Register
unsigned long *pLcdPalette	  =	(unsigned long *)(Videobase + 0x400);	// LCD Palette registers
int  LCDx_res, LCDy_res;        
int  LCDx_bpp_res;     
unsigned int LCD_BUFFER_SIZE = 320*240*2;

extern void set_LCDpalette256(void);


/******** lp variable *********/



/*
typedef struct 
{
	UINT16T x,y;
	UINT8T *Name;
	UINT16T para_flag;
	UINT8T *pdata;
}menu;
*/


UINT8T  WaveID=0;
UINT16T origin_x, origin_y;

/******** lp func *********/
void swap(UINT16T *a,UINT16T *b);
void LCDgenline_v(UINT16T x1,UINT16T y1,UINT16T y2,UINT16T width,UINT16T color_val);
void LCDgenline_h(UINT16T y1,UINT16T x1,UINT16T x2,UINT16T width,UINT16T color_val);
//void LCDgenline(UINT16T x0, UINT16T y0, UINT16T x1, UINT16T y1, UINT16T ucColor, UINT16T Width);
void LCDgenline(UINT16T usX0, UINT16T usY0, UINT16T usX1, UINT16T usY1, UINT16T ucColor, UINT16T usWidth);

void draw_box(UINT16T x1,UINT16T y1, UINT16T x2,UINT16T y2,UINT16T color_val);
void Lcd_disp_letter(UINT16T x0,  UINT16T y0, UINT16T ForeColor, UINT8T *s);

⌨️ 快捷键说明

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