中芯微VC0528测试程序
源代码在线查看: command.h
#ifndef __COMMAND_H__
#define __COMMAND_H__
#define START_FLAG 0x80
#define END_FLAG 0x08
/////////////////////////// Start Command id /////////////////////
#define VIMICRO_0578 0X86
/////////////////////////////End Command id//////////////
///////////////////////////// Start 9XX Command ///////////////////////////////////////////////
#define WRITE_REG_COMMAND 0x8181
#define READ_REG_COMMAND 0x8182
#define VPLR_INITIALIZ_COMMAND 0x8183
#define VPLR_CREATE_COMMAND 0x8184
#define VPLR_OPEN_COMMAND 0x8185
#define VPLR_LOAD_COMMAND 0x8186
#define VPLR_PLAY_COMMAND 0x8187
#define VPLR_PAUSE_COMMAND 0x8188
#define VPLR_RESUME_COMMAND 0x8189
#define VPLR_STOP_COMMAND 0x818A
#define VPLR_UNLOAD_COMMAND 0x818B
#define VPLR_CLOSE_COMMAND 0x818C
#define VPLR_DESTORY_COMMAND 0x818D
#define VPLR_MIDIVOL_COMMAND 0x818E
#define VPLR_WAVEVOL_COMMAND 0x818F
#define VPLR_SPVOL_COMMAND 0x8190
#define VPLR_GETVOL_COMMAND 0x8191
#define VPLR_GETTOTALTIME_COMMAND 0x8192
#define VPLR_GETCURTIME_COMMAND 0x8193
#define VPLR_SHOWLED_COMMAND 0x8194
#define VPLR_DRIVEMOTOR_COMMAND 0x8195
#define VPLR_REVERB_COMMAND 0x8196
#define VPLR_VERSION_COMMAND 0x8197
#define VPLR_STATE_COMMAND 0x8198
#define AUDIO_CONTROL_INTNUM 0x8199
#define VPLR_TONE_COMMAND 0x819A
#define FUNCTION_LOAD_COMMAND 0x819B
#define FUNCTION_PLAY_COMMAND 0x819C
#define FUNCTION_PAUSE_COMMAND 0x819D
#define FUNCTION_STOP_COMMAND 0x819E
#define FUNCTION_RESET_COMMAND 0x819F
#define AUDIO_CONTROL_SETVOL_COMMAND 0x81A0
#define AUDIO_CONTROL_OREVERB_COMMAND 0x81A1
#define AUDIO_CONTROL_SREVERB_COMMAND 0x81A2
#define AUDIO_CONTROL_OREPEAT_COMMAND 0x81A3
#define AUDIO_CONTROL_SREPEAT_COMMAND 0x81A4
#define AUDIO_CONTROL_OMOTOR_COMMAND 0x81A5
#define AUDIO_CONTROL_SMOTOR_COMMAND 0x81A6
#define AUDIO_CONTROL_GETSTATE_COMMAND 0x81A7
#define AUDIO_CONTROL_SHOWLED_COMMAND 0x81A8
#define AUDIO_KEYEFFECT_COMMAND 0x81A9
#define AUDIO_KEYDOWN_COMMAND 0x81AA
#define AUDIO_KEYUP_COMMAND 0x81AB
#define GET_TOTALEQ_COMMAND 0x81AC
#define SET_TOTALEQ_COMMAND 0x81AD
#define GET_MP3EQMODE_COMMAND 0x81AE
#define SET_MP3EQMODE_COMMAND 0x81AF
#define ENABLETOTALEQ_COMMAND 0x81B0
#define DISABLETOTALEQ_COMMAND 0x81B1
#define GET_MP3VOLSTEP_COMMAND 0x81B2
#define SET_MP3VOLSTEP_COMMAND 0x81B3
#define GET_TOTALEQVOLSTEP_COMMAND 0x81B4
#define SET_TOTALEQVOLSTEP_COMMAND 0x81B5
#define GET_POLYPHONY_COMMAND 0x81B6
#define SET_MP3SPEED_COMMAND 0x81B7
#define SET_MP3ATOB_COMMAND 0x81B8
#define AV_LOAD_COMMAND 0x81C0
#define AV_PLAY_COMMAND 0x81C1
#define AV_STOP_COMMAND 0x81C2
#define AV_UNLOAD_COMMAND 0x81C3
///////////////////////////// End 9XX Command ///////////////////////////////////////////////
///////////////////////////// Start 5XX Command ///////////////////////////////////////////////
#define WRITE568_REG_COMMAND 0x8281
#define READ568_REG_COMMAND 0x8282
#define V5_GETMARB_COMMAND 0x8283
#define V5_SETMARB_COMMAND 0x8284
#define V5_SIFI2C_READ_COMMAND 0x8285
#define V5_SIFI2C_WRITE_COMMAND 0x8286
#define V5_INIT_568_COMMAND 0x8287
#define V5_TESTREGISTER_COMMAND 0x8288
#define V5_WORKMODE_SET_COMMAND 0x8289
#define V5_WORKMODE_GET_COMMAND 0x828A
#define V5_PREVIEW_MODE_COMMAND 0x828B
#define V5_PREVIEW_ZOOM_COMMAND 0x828C
#define V5_PREVIEW_EXPTYPE_COMMAND 0x828D
#define V5_PREVIEW_EXPMODE_COMMAND 0x828E
#define V5_PREVIEW_BRIGHT_COMMAND 0x828F
#define V5_PREVIEW_CONTRAST_COMMAND 0x8290
#define V5_PREVIEW_SHARPN_COMMAND 0x8291
#define V5_PREVIEW_MIRROR_COMMAND 0x8292
#define V5_PREVIEW_EFFECT_COMMAND 0x8293
#define V5_PREVIEW_PARA_COMMAND 0x8294
#define V5_CAPTURE_PARA_COMMAND 0x8295
#define V5_CAPTURE_COMPRESS_COMMAND 0x8296
#define V5_CAPTURE_STILL_COMMAND 0x8297
#define V5_CAPTURE_TSTILL_COMMAND 0x8298
#define V5_CAPTURE_MULTI_COMMAND 0x8299
#define V5_CAPTURE_MJPEG_COMMAND 0x829A
#define V5_CAPTURE_MULTSHORT_COMMAND 0x829B
#define V5_CAPTURE_STOP_COMMAND 0x829C
#define V5_CAPTURE_GETLEN_COMMAND 0x829D
#define V5_CAPTURE_GETFRM_COMMAND 0x829E
#define V5_CAPTURE_GETTRS_COMMAND 0x829F
#define V5_CAPTURE_GETRS_COMMAND 0x82A0
#define V5_DECODE_JPEG_COMMAND 0x82A1
#define V5_DISPLAY_JPEG_COMMAND 0x82A2
#define V5_LCD_SETWORKM_COMMAND 0x82A3
#define V5_LCD_GETWORKM_COMMAND 0x82A4
#define V5_LCD_UPDATE_COMMAND 0x82A5
#define V5_LCD_RCTNGL_COMMAND 0x82A6
#define V5_LCD_COLORDEP_COMMAND 0x82A7
#define V5_LCD_PANEL_COMMAND 0x82A8
#define V5_LCD_PURECOLOR_COMMAND 0x82A9
#define V5_LCD_MIRROR_COMMAND 0x82AA
#define V5_YUVTORGB_COMMAND 0x82AB
#define V5_GETJPEGSIZE_COMMAND 0x82AC
#define V5_I2C_READW_COMMAND 0x82AD
#define V5_I2C_WRITEW_COMMAND 0x82AE
#define V5_GPIO_MODE_COMMAND 0x82AF
#define V5_GPIO_SETV_COMMAND 0x82B0
#define V5_GPIO_GETV_COMMAND 0x82B1
#define V5_AVI_TIME_COMMAND 0x82B2
#define V5_GETMIRROR_COMMAND 0x82B3
#define V5_CAPTURE_QUALITY_COMMAND 0x82B4
#define V5_ENCODE_JPEG_COMMAND 0x82B5
#define V5_DISPLAY_PAN_COMMAND 0x82B6
#define V5_CAPTURE_READ_COMMAND 0x82B7
#define V5_CALCULATE_VIDEO_COMMAND 0x82B8
#define V5_CAPTURE_AVI_COMMAND 0x82B9
#define V5_JPEG_INFO_COMMAND 0x82BA
#define V5_JPEG_ZOOM_COMMAND 0x82BB
#define V5_DISPLAY_MJPEG_COMMAND 0x82BC
#define V5_FUNCTION_CAPTURE 0x82BD
#define V5_FUNCTION_THUMB 0x82BE
///////////////////////////// End 5XX Command ///////////////////////////////////////////////
///////////////////////////// Start 858 Command ///////////////////////////////////////////////
#define V858_HIF8_WRITE 0x8481
#define V858_HIF8_READ 0x8482
#define V858_HIF16_WRITE 0x8483
#define V858_HIF16_READ 0x8484
#define V858_HIF32_WRITE 0x8485
#define V858_HIF32_READ 0x8486
///////////////////////////// End 858 Command ///////////////////////////////////////////////
///////////////////////////// Start Function Command ///////////////////////////////////////////////
#define DOWNLOAD_COMMAND 0x8381
#define UPLOAD_COMMAND 0x8382
#define RESET_COMMAND 0x8383
#define SONGLIST_COMMAND 0x8384
///////////////////////////// End Function Command ///////////////////////////////////////////////
#define OPEN_REVERB 0x01
#define SHUT_REVERB 0x00
#define OPEN_REPEAT 0x01
#define SHUT_REPEAT 0x00
#define OPEN_MOTOR 0x01
#define SHUT_MOTOR 0x00
#define V_MIDITYPE 0
#define V_SMAFTYPE 1
#define V_MP3TYPE 2
#define V_WAVETYPE 3
#define V_VMDTYPE 4
#define DORMANCY 0
#define IDLE 1
#define LOADED 2
#define OPENED 3
#define READY 4
#define PLAYING 5
#define PAUSE 6
#endif