dcmi_mcu_get_upgrade_statues Prototype
Syntax
int dcmi_mcu_get_upgrade_statues(int card_id, int *status, int *progress)
Function
Queries the MCU upgrade status and progress.
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. |
status |
Output |
int * |
Upgrade progress. The value is a percentage ranging from 0 to 100. |
progress |
Output |
int * |
Upgrade status. The options are as follows: 0: The upgrade is successful. 1: The upgrade is in progress. 2: The upgrade is not supported. 3: The upgrade has failed. 4: Failed to obtain the upgrade status. |
Return Value
Type |
Description |
---|---|
int |
Results:
|
Exception Handling
N/A
Constraints
The program that invokes this interface must be run by the root user of the physical machine. If the program is run by a non-root user of the physical machine, container, or VM, a permission error is returned.
Calling Example
...
int ret = 0;
int card_id = 0x56; int status; int progress;
ret = dcmi_mcu_get_upgrade_statues(card_id, &status, &progress);
if(ret != 0) {
//todo: records logs
return ret;
}
...