dcmi_get_pcie_info Prototype
Syntax
int dcmi_get_pcie_info (int card_id, int device_id, struct tag_pcie_idinfo *pcie_idinfo)
Function
Queries the Peripheral Component Interconnect Express (PCIe) device information.
Parameter Description
Parameter |
Input/Output |
Type |
Description |
---|---|---|---|
card_id |
Input |
int |
ID of the Atlas 300T training card (model 9000). Query the supported IDs by referring to dcmi_get_card_num_list Prototype. |
device_id |
Input |
int |
Chip ID. The value is 0 (there is only one chip). Query the actually supported range by referring to dcmi_get_device_num_in_card Prototype. |
pcie_idinfo |
Output |
struct tag_pcie_idinfo * |
PCIe device information. The definition is as follows: typedef struct tag_pcie_idinfo { unsigned int deviceid; unsigned int venderid; unsigned int subvenderid; unsigned int subdeviceid; unsigned int bdf_deviceid; unsigned int bdf_busid; unsigned int bdf_funcid; }DCMI_TAG_PCIE_IDINFO; |
Return Value
Type |
Description |
---|---|
int |
Results:
|
Exception Handling
N/A
Constraints
N/A
Calling Example
int ret = 0;
int card_id = 0x56;
int device_id = 0;
struct tag_pcie_idinfo pcie_idinfo = {0};
ret = dcmi_get_pcie_info(card_id, device_id, &pcie_idinfo);
if(ret != 0) {
//todo: records logs
return ret;
}
...