dcmi_get_device_power_info Prototype
Syntax
int dcmi_get_device_power_info(int card_id, int device_id, int *power)
Function
Queries the chip power consumption.
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. |
power |
Output |
int |
Chip power consumption. The unit is W and the precision is 0.1 W. The value is an unsigned short integer of 16 bits in the little endian format. The calculation formula is value = reading x 0.1. |
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;
int power = 0;
ret = dcmi_get_device_power_info(card_id, device_id, &power);
if(ret != 0) {
//todo: records logs
return ret;
}
...