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

📄 cmapi.h

📁 MatLab图像传感器网络仿真平台WiSNAP
💻 H
字号:
/*
 * cmAPI.h - header file for the Camera Module API
 *
 */

#ifndef CMAPI_H
#define CMAPI_H
/* definitions */
typedef enum {
    CM_TYPE_DEFAULT = 0,
    CM_TYPE_RGB888 = 64,
    CM_TYPE_RGB666A,
    CM_TYPE_RGB666B,
    CM_TYPE_RGB565,
    CM_TYPE_RGB444A,
    CM_TYPE_RGB444B,
    CM_TYPE_RGB444C,
    CM_TYPE_RGB332,
    CM_TYPE_YUV422A,
    CM_TYPE_YUV422B,
    CM_TYPE_YUV422C,
    CM_TYPE_YUV422D,
    CM_TYPE_YUV444,
    CM_TYPE_GREY,
    CM_TYPE_RAWBPA,
    CM_TYPE_RAW,
    CM_TYPE_JPEG422	= 8320,    	/* default setting - SH: required for Matlab compatibility */
    CM_TYPE_JPEGGREY 	= 8192,	/* SH: required for Matlab compatibility */
    CM_TYPE_JPEG444 	= 8256	/* SH: required for Matlab compatibility */
} ImageType_t;

typedef struct {
	ImageType_t type;
    int subtype;
    int szr_out_h;
    int szr_out_w;
    int szr_in_h;
    int szr_in_w;
} Image_t;

/* cmAPISet tag values */
#define CM_TAG_BAUDRATE 1
#define CM_TAG_PACKETCODE 2
#define CM_TAG_IMAGE_TIMEOUT 3
#define CM_PACKETCODES 0
#define CM_NO_PACKETCODES 1

/* function prototypes */
char * cmRevisionGet(void);
int cmIdGet (unsigned int *id_p);
int cmInit (char *comport, char *inifile);
void cmDestroy (void);
void cmDebugLevelSet (int debug_level);
void cmWrite2File (unsigned char *whole_jpg, int whole_jpg_len, char *filename);
int cmImageGet (unsigned char *buffer, int *bufferlen);
int cmImageSnap (Image_t *ImageType);
int cmFlowCtlSet (int credits);
void cmAbort (void);
int cmApiSet (int tag, int value);
int cmStatusGet (unsigned int *flag_p);
int cmImageTypeSet (ImageType_t type);
int cmImageTypeGet (ImageType_t *type_p);
int cmImageSizeGet (int *width_p, int *height_p);
int cmImageVid (void);
#endif

⌨️ 快捷键说明

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