A PU can call this function to request that the power management controller call its notify callback whenever a qualifying event occurs. One can request to be notified for a specific or any event related to a specific node.
- nodeID : ID of the node to be notified about,
- eventID : ID of the event in question, '-1' denotes all events ( - EVENT_STATE_CHANGE, EVENT_ZERO_USERS),
- wake : true: wake up on event, false: do not wake up (only notify if awake), no buffering/queueing
- callback : Pointer to the custom callback function to be called when the notification is available. The callback executes from interrupt context, so the user must take special care when implementing the callback. Callback is optional, may be set to NULL.
- received : Variable indicating how many times the notification has been received since the notifier is registered.
Note: The caller shall initialize the notifier object before invoking the XPm_RegisteredNotifier function. While notifier is registered, the notifier object shall not be modified by the caller.
Prototype
XStatus XPm_RegisterNotifier(XPm_Notifier *const notifier);
Parameters
The following table lists the XPm_RegisterNotifier
function arguments.
Type | Name | Description |
---|---|---|
XPm_Notifier
*const |
notifier | Pointer to the notifier object to be associated with the requested notification. The notifier object contains the following data related to the notification: |