Polaris Project
|
Functions | |
int | polaris_get_devices (int *devs, int devs_len) |
Get list of all the FPGA devices. More... | |
int | polaris_get_devices (const char *firmware_name, int *devs, int devs_len) |
Get list of all the FPGA devices that match the given firmware name. More... | |
int | polaris_get_driver_version (char *ver, int ver_len) |
Get version string of the driver. More... | |
Functions related to device management, including quering the version and matching devices.
int polaris_get_devices | ( | int * | devs, |
int | devs_len | ||
) |
Get list of all the FPGA devices.
This function always returns the number of all FPGA devices installed in the system, even if it is greater than devs_len
, but in anycase, it will never write more than devs_len
device ids into devs
.
[out] | devs | list of all FPGA devices' ids |
[in] | devs_len | malloced length (number of ints) of devs |
-errno
if error happens. int polaris_get_devices | ( | const char * | firmware_name, |
int * | devs, | ||
int | devs_len | ||
) |
Get list of all the FPGA devices that match the given firmware name.
This function always returns the number of all FPGA devices that match the firmware_name
, even if it is greater than devs_len
, but in anycase, it will never write more than devs_len
device ids into devs
.
[in] | firmware_name | firmware name to query |
[out] | devs | list of all FPGA devices' ids |
[in] | devs_len | malloced length (number of ints) of devs |
-errno
if error happens. int polaris_get_driver_version | ( | char * | ver, |
int | ver_len | ||
) |
Get version string of the driver.
This function always returns the length of driver version string (including the trailing '\0'), even if it is greater than ver_len
, but it will never write more than ver_len
chars into ver
.
[out] | ver | version string buffer |
[in] | ver_len | malloced length (number of bytes) for ver |
-errno
if error happens.