MPIControlFlashLoadProgressFn

Definition

typedef void (MPI_DECL2 *MPIControlFlashProgressFn)(void* userData, size_t percent);
typedef MPIControlFlashProgressFn MPIControlFlashLoadProgressFn;

 

Required Header: stdmpi.h
Change History: Added in 04.00.00

Description

MPIControlFlashLoadProgressFn is a type definition for callback functions to be used by mpiControlFlashLoadFromFile to report progress. Any function that is passed to mpiControlFlashLoadFromFile must have the same function signature as MPIControlFlashLoadProgressFn.

userData The user data passed into the mpiControlFlashLoadFromFile function. This is useful when the callback function needs to be associated with a particular C structure or C++ class instance.
percent The current completion percentage of the firmware load operation. The range of the function is from 0 to 100.

Sample Code

/* This is a callback function that matches the MPIControlFlashLoadProgressFn
 * prototype. It is used as an argument to mpiControlFlashLoadFromFile.
 */
void MPI_DECL2 myLoadProgressFn (void* userData, size_t percent)
{
  printf("Firmware load progress: %2d\r", percent);
  fflush(stdout);
}

See Also

mpiControlFlashSaveToFile