mpiControlFlashSaveAll
Definition
MPI_DECL1 MPI_RESULT MPI_DECL2 mpiControlFlashSaveAll(MPIControl control, MPIControlFlashSaveProgressFn progressCallback, void *userData;
Required Header: stdmpi.h
Change History: Added in 04.00.
Description
mpiControlFlashSaveAll saves all the firmware configuration data on the controller to flash memory. This includes all configuration for the MPIControl object as well as all sub-objects (such as MPIAxis, MPISynqNet, and MPISqNode). Progress status is reported via the optional progressCallback callback function.
control | The controller on which all configuration information will be saved to flash memory. |
---|---|
progressCallback | An optional argument that points to the callback function where the progress of the function will be reported. If progressCallback is NULL , no progress will be reported. |
userData | A user supplied pointer that will be passed to the progressCallback callback function. Useful when the callback function needs to be associated with a particular C structure or C++ class instance. |
Return Values |
---|
MPIMessageOK |
Sample Code
void MPI_DECL2 mySaveAllProgressFn (void* userData, size_t percent) { printf("Firmware save progress: %2d\r", percent); fflush(stdout); } void saveAllToFlash (MPIControl control) { MPI_RESULT returnValue = mpiControlFlashSaveAll( control, NULL, /* No status */ NULL); /* No user data */ msgCHECK(returnValue); } void saveAllToFlashWithStatus (MPIControl control) { MPI_RESULT returnValue = mpiControlFlashSaveAll( control, mySaveAllProgressFn, /* Print status */ NULL); /* No user data */ msgCHECK(returnValue); }