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

📄 commondef.h

📁 用于DSP下摄像机的图像抓取、图像处理和传输、以及与上位机TCP/IP通信的工程文件。基于Texas Instruments Code Composer Studio实现。
💻 H
字号:
//全局的定义文件
#ifndef __COMMONDEF_H__
#define __COMMONDEF_H__


#ifdef __cplusplus
extern "C" {
#endif

//error define

#define ENO					0
#define EINVPARAM			1	//Read parameter is invalid
#define EBADIMAGE			2	//Pool quality image
#define ERCPFAILED			5	//Read rcp failed
#define ELOWSCORES			6	//Read rcp lowscores
#define ESTORAGE			7	//Save data failed
#define EMEMORY				8	//Memory fault
#define ECAPIMAGE			9	//cv800 capture image failed
#define ERCPMAXNUM			12	//The number of rcp file is max
#define ERCPEXIST			13	//RCP file already existed
#define ESENDREQUEST		14	//Send request to cv800 failed
#define ERESPTIMEOUT		15	//Get response from cv800 failed
#define EINVRESPONSE		16	//Get invalid response from cv800
#define EINVREQUEST			17	//A invalid request to cv800
#define ENOFILE				18	//No such file in cv800
#define EOPENFILE			19	//Open file failed
#define EINVFILETYPE		20	//Invalid file type
#define EINVFILE			21  //Bad file
#define EINVFILENAMELEN		22  //Invalid file name lengh
#define EINVLINK			23	//Invalid link
#define ECREATELINK			24	//Create link failed
#define EINVLINKTYPE		25	//Invalid link type
#define EMAXLINKNUM			26	//The number of link is max
#define ECONNECT			27	//Connect to cv800 failed
#define EREADINPROC			28	//Read without block
#define EREADPENDING		29  //Last read result is not pop


//for dsp system used
#define ESYSNOLOG				4099
#define ESYSLOGFULL				5000

//For task communication
typedef struct _tagMbxMessage
{
	int nDataLen;
	char *pData;
	unsigned short nCommandType;
	unsigned short nCommand;
	unsigned short nDataType;
	short nError;
	char cSrc;
	char cDst;
}MBX_MESSAGE;

//typedef struct _tagCameraInfo
//{
//	unsigned int	nExpose;			
//	unsigned int	nGain;				
//	unsigned int	nFrameRate;			
//    int     nReserved[2];			
//}CAMERA_INFO;

typedef struct _tagImageInfo
{
	int nXStart;
	int nYStart;
	int nWidth;
	int nHeight;
	int nImgType;
	unsigned int unExposureValue;
	unsigned int unGainValue;
	int nAveragePixelValue;
	int nAgeMode;
}IMAGE_INFO;

/*
typedef struct _tagUartParam
{
	int nBaudRate;
	int nStopBit;
	int nWordLen;
	int nParity;
	int nFlowCtrl;
}UART_PARAM;

typedef struct _tagSerialPortInfo
{
	UART_PARAM stUartParam;
	int nEndInput;
	int nEndOutput;
	int nProtocal;
}SERPORT_INFO;
*/
extern char dataBuf[];

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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