1.2.1.20 SYS_MODULE_STATUS_ROUTINE Typedef

C

typedef SYS_STATUS (* SYS_MODULE_STATUS_ROUTINE) ( SYS_MODULE_OBJ object );

Summary

Pointer to a routine that gets the current status of a system module (driver, library, or system-maintained application).

Description

This data type is a pointer to a routine that gets the current status of a system module (driver, library, or system-maintained application).

Precondition

The low-level board initialization must have (and will be) completed and the module's initialization routine will have been called before the system will call the status routine for any modules.

Parameters

ParamDescription
objectHandle to the module instance

Returns

One of the possible status codes from SYS_STATUS

Remarks

A module's status operation can be used to determine when any of the other module level operations has completed as well as to obtain general status of the module. The value returned by the status routine will be checked after calling any of the module operations to find out when they have completed.

If the status operation returns SYS_STATUS_BUSY, the previous operation has not yet completed. Once the status operation returns SYS_STATUS_READY, any previous operations have completed.

The value of SYS_STATUS_ERROR is negative (-1). A module may define module-specific error values of less or equal SYS_STATUS_ERROR_EXTENDED (-10).

The status function must NEVER block.

If the status operation returns an error value, the error may be cleared by calling the reinitialize operation. If that fails, the deinitialize operation will need to be called, followed by the initialize operation to return to normal operations.