User Manual
- 14 -
2.2.3 Port to the user’s platform
SDK Lite only supports HPS3D160 Depth camera with RS232 and RS485, due to the
differences between platforms, bottom layer such as communication interfaces need to be
ported
1、 Edit HPS3DToFSDKLite/src/hal.c file
2、 Adapt Uart_Read and Uart_Write interfaces is fine,Take an example based on HAL
library STM32 platform
2.2.4 Use SDK in user’s project
1. The source file includes head file, sample code:
#include "HPS3DToFSDKLite/inc/api.h"
2. Call the initialization API to initialize the Depth camera accordingly. This function will set
the camera's packet format to a compact format and stop the current continuous
measurement, returning the current camera's device address. This address will be used in
other APIs. , be sure to check the return value of the initialization function, and determine
whether the initialization is successful based on the return value. Most of the SDK's APIs
provide operational state return. It is recommended that users check the return value of
each API to ensure reliability. Sample code:
HPS3D_Initialize(&dev_addr);
3. After step 2, you can use the API in the SDK to parse the packet and configure the Depth
camera parameters.
2.2.5 Analyze measurement packets using the SDK
The SDK provides a data parsing API, but does not implement the receipt of measurement
data because it is too relevant to the platform.
1. Set the camera's operating mode, three modes are available:
1) RUN_IDLE: Idle mode, in which the camera enters standby mode without any
measurement.










