beautypg.com

Inithardware, Getdevicelist, Inithardwarefromlist – Dataman 770 Series User Manual

Page 15

background image


Development kit for DATAMAN 770 series

Programmer’s Guide

3.2.2. InitHardware

Initializes device. After successful call of this function, the device can be used.

int __stdcall __export InitHardware(unsigned char *CalibOK);


Parameters:
CalibOK – this variable will be filled with information whether the calibration data in
the device is ok

1 – calibration data are ok

0 – calibration data in the device are broken


Return value:
ERROR_OK – device was initialized successfully
ERROR_UNABLE_TO_LOAD_EM77X – unable to load em77x driver
ERROR_INIT_FAILED – device initialization failed (one of the reason can be,
that the device isn’t connected)
ERROR_FPGA_CONFIG_FAILED – FPGA initialization failed
ERROR_DK_NOT_ENABLED – the DK isn’t enabled in the connected device
ERROR_DRIVER_NOT_LOADED – the driver m770drv.dll wasn’t loaded
before this call (use LoadDriver function to load it)

3.2.3. GetDeviceList

Obtains the list of the connected devices. This function is used when several 770
oscilloscopes are connected.

void __stdcall __export GetDeviceList(unsigned int *DevList);


Parameters:
DevList – array with length of 16, which is filled with the serial numbers of the found
devices

Return value: -

3.2.4. InitHardwareFromList

Initializes selected device. This function is used when several 770 oscilloscopes are
connected. After successful call, the active device can be selected by UseDevice
function.

int __stdcall __export InitHardwareFromList(int index,unsigned char

*CalibOK);

Parameters:
index – indicates device index from the list (obtained by GetDeviceList function)
CalibOK – this variable will be filled with information whether the calibration data in
the device are ok

1 – calibration data are ok

0 – calibration data in the device are broken

- 15 -