Atlas 300I Inference Card Earlier than 1.0.11 DCMI API Reference (Models 3000, 3010) 13

dcmi_get_device_voltage Prototype

dcmi_get_device_voltage Prototype

Syntax

int dcmi_get_device_voltage (int card_id, int device_id, unsigned int *pvoltage)

Function

Queries the chip voltage.

Parameter Description

Parameter

Input/Output

Type

Description

card_id

Input

int

ID of the Atlas 300I inference card. Query the supported IDs by referring to dcmi_get_card_num_list Prototype.

device_id

Input

int

Chip ID ranging from 0 to 3. Query the actually supported range by referring to dcmi_get_device_num_in_card Prototype.

pvoltage

Output

unsigned int *

Chip voltage: The unit is V and the precision is 0.01 V. It is a 16-bit unsigned short integer, in little endian mode.

The calculation formula for baseboard management controllers (BMCs) is value = reading x 0.01.

Return Value

Type

Description

int

Results:

  • If the return value is 0, the operation is successful.
  • If the return value is an error code less than 0, the operation fails.

Exception Handling

N/A

Constraints

N/A

Calling Example

int ret = 0; 
unsigned int  voltage; 
int card_id = 0x56;
int device_id = 0;
ret = dcmi_get_device_voltage(card_id, device_id, &voltage); 
if(ret != 0) { 
//todo: records logs. 
return ret; 
} 
...
Translation
Favorite
Download
Update Date:2022-06-01
Document ID:EDOC1100115213
Views:46653
Downloads:145
Average rating:0.0Points

Digital Signature File

digtal sigature tool