PWRM_getDependencyCount
2-318
C Interface
Syntax
status = PWRM_getDependencyCount(resourceID, count);
Parameters
Uns
resourceID;
/* resource ID */
Uns
*count;
/* pointer to where count is written */
Return Value
PWRM_Status status;
/* returned status */
Reentrant
yes
Description
PWRM_getDependencyCount returns the number of dependencies that
are currently declared on a resource. Normally this corresponds to the
number of times PWRM_setDependency has been called for the
resource, minus the number of times PWRM_releaseDependency has
been called for the same resource.
Resource IDs are device-specific. They are defined in a
PWRM_Resource enumeration in a device-specific header file. For
example, see pwrm5509a.h for the ’C5509A.
PWRM_getDependencyCount returns one of the following constants as
a status value of type PWRM_Status:
Example
/* Display some dependency counts */
LOG_printf(&trace, "Initial dependencies:");
PWRM_getDependencyCount(PWRM_5509A_CLKOUT, &count);
LOG_printf(&trace, "CLKOUT count = %d", count);
PWRM_getDependencyCount(PWRM_5509A_MCBSP0, &count);
LOG_printf(&trace, "McBSP0 count = %d", count);
PWRM_getDependencyCount(PWRM_5509A_DMA_DOMAIN,&count);
LOG_printf(&trace, "DMA domain count = %d", count);
PWRM_getDependencyCount
Get count of dependencies declared on resource
Name
Usage
PWRM_SOK
The operation succeeded, and the refer-
ence count was written to the location
pointed to by count.
PWRM_ENOTIMPLEMENTED
The operation failed because resource
tracking is not supported.