User Manual
- 18 -
RET_StatusTypeDef(*ConfigInit)(HPS3D_HandleTypeDef *handle) = NULL;
RET_StatusTypeDef (*AddObserver)(
void
* (*fun)(HPS3D_HandleTypeDef *,
AsyncIObserver_t *), HPS3D_HandleTypeDef *handle, AsyncIObserver_t
*Observer_t) = NULL;
RET_StatusTypeDef(*SetRunMode)(HPS3D_HandleTypeDef *handle) = NULL;
RET_StatusTypeDef(*RemoveDevice)(HPS3D_HandleTypeDef *handle) = NULL;
RET_StatusTypeDef(*SingleMeasurement)(HPS3D_HandleTypeDef *handle,
MeasureDataTypeDef *MeasureData, RetPacketTypedef *PacketType) = NULL;
uint32_t (*GetDeviceList)(uint8_t * dirPath, uint8_t *prefix, uint8_t
fileName[DEV_NUM][DEV_NAME_SIZE]) = NULL;
3、Load the dynamic library and get the corresponding function address
/*Load Library*/
HMODULE module =
LoadLibraryA
("libhps3d.dll");
DWORD error_id =
GetLastError
();
if
(module == NULL)
{
system
("error load");
return
0;
}
SetDebugEnable = (RET_StatusTypeDef(*)(bool en))
GetProcAddress
(module,
"HPS3D_SetDebugEnable");
SetDebugFunc = (RET_StatusTypeDef(*)(
void
*Call_Back))
GetProcAddress
(module, "HPS3D_SetDebugFunc");
Connect = (RET_StatusTypeDef(*)(HPS3D_HandleTypeDef
*handle))
GetProcAddress
(module, "HPS3D_Connect");
ConfigInit = (RET_StatusTypeDef(*)(HPS3D_HandleTypeDef
*handle))
GetProcAddress
(module, "HPS3D_ConfigInit");
AddObserver = (RET_StatusTypeDef(*)(
void
* (*fun)(HPS3D_HandleTypeDef *,
AsyncIObserver_t *), HPS3D_HandleTypeDef *, AsyncIObserver_t
*))
GetProcAddress
(module, "HPS3D_AddObserver");
SetRunMode = (RET_StatusTypeDef(*)(HPS3D_HandleTypeDef
*handle))
GetProcAddress
(module, "HPS3D_SetRunMode");
RemoveDevice = (RET_StatusTypeDef(*)(HPS3D_HandleTypeDef
*handle))
GetProcAddress
(module, "HPS3D_RemoveDevice");
SingleMeasurement = (RET_StatusTypeDef(*)(HPS3D_HandleTypeDef *,
MeasureDataTypeDef *, RetPacketTypedef *))
GetProcAddress
(module,
"HPS3D_SingleMeasurement");
GetDeviceList = (uint32_t(*)(uint8_t * , uint8_t *, uint8_t
fileName[DEV_NUM][DEV_NAME_SIZE]))
GetProcAddress
(module,
"HPS3D_GetDeviceList");
4. Call the corresponding interface function for device connection, device initialization
configuration, etc. For detailed examples, please refer to the Demo program under Windows
platform;
① device connection










