1    /* --COPYRIGHT--,TI
     2     * Copyright (c) $(CPYYEAR)
     3     * Texas Instruments
     4     *
     5     *  All rights reserved.  Property of Texas Instruments
     6     *  Restricted rights to use, duplicate or disclose this code are
     7     *  granted through contract.
     8     * 
     9     * --/COPYRIGHT--*/
    10    /*
    11     *  ======== INotifyDriver.xdc ========
    12     *  
    13     *! Revision History
    14     *! ================
    15     *! 24-Mar-2010 skp     update cdoc, removed callback fxn typedef
    16     *! 19-Nov-2009 skp     cdoc updates
    17     *! 18-Nov-2009 skp     Code review changes
    18     *! 05-Nov-2009 kw      major updates to simplify the drivers
    19     *! 26-Oct-2009 skp     Added getEventList()
    20     *! 06-Feb-2009 yogesh  modified to incorporate review comments
    21     *! 08-Jan-2009 yogesh  created
    22     */
    23    
    24    /*!
    25     *  ======== INotifyDriver ========
    26     *  Notify driver interface
    27     *
    28     *  Interface implemented by all drivers for the notify module.  Modules that
    29     *  implement this interface expect the eventId arguments to be valid.
    30     */
    31    
    32    interface INotifyDriver {
    33        
    34    instance:
    35    
    36        /*!
    37         *  ======== registerEvent ========
    38         *  Register a callback to an event
    39         *
    40         *  This driver function is called by the Notify_registerEvent function 
    41         *  within the Notify module gate. Refer to its documentation for more 
    42         *  details.  
    43         *
    44         *  @param(eventId)      Number of event that is being registered
    45         */
    46        Void registerEvent(UInt32 eventId);
    47    
    48        /*!
    49         *  ======== unregisterEvent ========
    50         *  Remove an event listener from an event
    51         *
    52         *  This driver function is called by the Notify_unregisterEvent function
    53         *  within the Notify module gate. Refer to it for more details.
    54         *
    55         *  @param(eventId)      Number of event that is being unregistered
    56         */
    57        Void unregisterEvent(UInt32 eventId);
    58    
    59        /*!
    60         *  ======== sendEvent ========
    61         *  Send a signal to an event
    62         *
    63         *  This interface function is called by the Notify_sendEvent function.
    64         *  Notify_sendEvent does not provide any context protection for
    65         *  INotifyDriver_sendEvent, so appropriate measures must be taken within
    66         *  the driver itself.
    67         *
    68         *  @param(eventId)      Number of event to signal
    69         *  @param(payload)      Payload (optional) to pass to callback function
    70         *  @param(waitClear)    If TRUE, have the NotifyDriver wait for
    71         *                       acknowledgement back from the destination
    72         *                       processor.
    73         *
    74         *  @b(returns)          Notify status
    75         */
    76        Int sendEvent(UInt32 eventId, UInt32 payload, Bool waitClear);
    77    
    78        /*!
    79         *  ======== disable ========
    80         *  Disable a NotifyDriver instance
    81         *
    82         *  Disables the ability of a Notify driver to receive events for a given
    83         *  processor. This interface function is called by the Notify_disable
    84         *  function. Refer to its documentation for more details.
    85         */
    86        Void disable();
    87    
    88        /*!
    89         *  ======== enable ========
    90         *  Enable a NotifyDriver instance
    91         *
    92         *  Enables the ability of a Notify driver to receive events for a given
    93         *  processor. This interface function is called by the Notify_restore 
    94         *  function. Refer to its documentation for more details.
    95         */
    96        Void enable();
    97    
    98        /*!
    99         *  ======== disableEvent ========
   100         *  Disable an event
   101         *
   102         *  This interface function is called by the Notify_disableEvent function. 
   103         *  Refer to its documentation for more details.
   104         *
   105         *  The Notify module does validation of the eventId.  The Notify module
   106         *  enters calls this function within the Notify module gate.
   107         *
   108         *  @param(eventId)      Number of event to disable
   109         */
   110        Void disableEvent(UInt32 eventId);
   111    
   112        /*!
   113         *  ======== enableEvent ========
   114         *  Enable an event
   115         *
   116         *  This interface function is called by the Notify_disableEvent function. 
   117         *  Refer to its documentation for more details.
   118         *
   119         *  The Notify module does validation of the eventId.  The Notify module
   120         *  enters calls this function within the Notify module gate.
   121         *
   122         *  @param(eventId)      Number of event to enable
   123         */
   124        Void enableEvent(UInt32 eventId);
   125        
   126        /*! @_nodoc
   127         *  ======== setNotifyHandle ========
   128         *  Called during Notify instance creation to 'send' its handle to its
   129         *  corresponding notify driver instance
   130         */
   131        Void setNotifyHandle(Ptr driverHandle);
   132        
   133    }