User Manual

- 34 -
3
Command function interface
The command function interface is the basic command in the HPS3D depth camera; each
command function interface contains command packet packing and return packet parsing for the
command. If the function interface integrated in api.h is not enough for the user to use, the user
can configure the new interface according to the command function interface. (Note: After sending
the command, you need to reset the running mode!!!)
3.1 Set running mode
3.1.1 Sample code
HPS3D_HandleTypeDef handle;
int
main
(
int
argc,
char
*argv[])
{
......
handle.DeviceName = "/dev/ttyACM0"; // handle.DeviceName = "\\\\.\\COM13"
/*HPS3D connect*/
ret = HPS3D_Connect(&handle);
/* Device initialization, get handle.DeviceAddr*/
ret = HPS3D_ConfigInit(&handle);
/*Set to continuous measurement mode*/
handle.RunMode =
RUN_CONTINUOUS
;
ret = HPS3D_SetRunMode(&handle);
......
}