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

📄 global.h

📁 基于EasyArm2200和ucOS2的SD卡文件系统的实现
💻 H
字号:
#ifndef _GLOBAL_H_
#define _GLOBAL_H_

#include "cfg.h"

static unsigned INT g_scale100=100;

/************************************* MACROS ***********************************/
/*Define the Longitude and the Latitude of refrence point*/
#define OX 0
#define OY 0
#define ER 6400
#define PI 3.1415926

/*#define MOVE(pPt,dx,dy) {pPt->x+=dx;pPt->y+=dy;}
#define ZOOM(pPt,scale) {(scale>0 && scale!=0)? pPt->x*=scale,pPt->y*=scale \
	: pPt->x/=scale,pPt->y/=scale;}
#define ROTA(pPt,theta,x,y) {x=(pPt->x)*cos(theta*PI/180)-(pPt->y)*sin(theta*PI/180);\
	y=(pPt->x)*sin(theta*PI/180)+(pPt->y)*cos(theta*PI/180);\
	pPt->x=x;pPt->y=y;}
#define MAP(pPt) {pPt->x=pPt->x * g_scale100/100 + g_off.x;\
	pPt->y=pPt->y * g_scale100/100 + g_off.y;}*/


/************************************* STRUCTION ***********************************/
typedef unsigned INT UINT;

/*Point type:turning point,crossing point,stop*/
typedef enum{ TURNING=0,CROSSING,STOP=1 } PointType;

/*GPS Point*/
typedef struct{
	INT Lng;/*Longitude*/
	INT Lat;/*Latitude*/
}GPoint;

/*Planar Point*/
typedef struct{
	INT x,y;
}Point;

/*Vector*/
typedef Point Vect;

/*Symble Building*/
typedef struct{
	INT x;
	INT y;
	char szName[10];
}Stop;

/*Road*/
typedef struct _Road{
	/*char szName[10];*/
	INT PtCount;/*point count*/
	Point* pt;
}Road;

static Point g_off={0,0};

#endif /*_GLOBAL_H_*/

⌨️ 快捷键说明

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