1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32 33 34 35 36 37 38 39 40 41 42 43 44
45
46 /*!
47 * ======== INotifyDriver ========
48 * Notify driver interface
49 *
50 * Interface implemented by all drivers for the notify module. Modules that
51 * implement this interface expect the eventId arguments to be valid.
52 */
53
54 interface INotifyDriver {
55
56 instance:
57
58 /*!
59 * ======== registerEvent ========
60 * Register a callback to an event
61 *
62 * This driver function is called by the Notify_registerEvent function
63 * within the Notify module gate. Refer to its documentation for more
64 * details.
65 *
66 * @param(eventId) Number of event that is being registered
67 */
68 @DirectCall
69 Void registerEvent(UInt32 eventId);
70
71 /*!
72 * ======== unregisterEvent ========
73 * Remove an event listener from an event
74 *
75 * This driver function is called by the Notify_unregisterEvent function
76 * within the Notify module gate. Refer to it for more details.
77 *
78 * @param(eventId) Number of event that is being unregistered
79 */
80 @DirectCall
81 Void unregisterEvent(UInt32 eventId);
82
83 /*!
84 * ======== sendEvent ========
85 * Send a signal to an event
86 *
87 * This interface function is called by the Notify_sendEvent function.
88 * Notify_sendEvent does not provide any context protection for
89 * INotifyDriver_sendEvent, so appropriate measures must be taken within
90 * the driver itself.
91 *
92 * @param(eventId) Number of event to signal
93 * @param(payload) Payload (optional) to pass to callback function
94 * @param(waitClear) If TRUE, have the NotifyDriver wait for
95 * acknowledgement back from the destination
96 * processor.
97 *
98 * @b(returns) Notify status
99 */
100 @DirectCall
101 Int sendEvent(UInt32 eventId, UInt32 payload, Bool waitClear);
102
103 /*!
104 * ======== disable ========
105 * Disable a NotifyDriver instance
106 *
107 * Disables the ability of a Notify driver to receive events for a given
108 * processor. This interface function is called by the Notify_disable
109 * function. Refer to its documentation for more details.
110 */
111 @DirectCall
112 Void disable();
113
114 /*!
115 * ======== enable ========
116 * Enable a NotifyDriver instance
117 *
118 * Enables the ability of a Notify driver to receive events for a given
119 * processor. This interface function is called by the Notify_restore
120 * function. Refer to its documentation for more details.
121 */
122 @DirectCall
123 Void enable();
124
125 /*!
126 * ======== disableEvent ========
127 * Disable an event
128 *
129 * This interface function is called by the Notify_disableEvent function.
130 * Refer to its documentation for more details.
131 *
132 * The Notify module does validation of the eventId. The Notify module
133 * enters calls this function within the Notify module gate.
134 *
135 * @param(eventId) Number of event to disable
136 */
137 @DirectCall
138 Void disableEvent(UInt32 eventId);
139
140 /*!
141 * ======== enableEvent ========
142 * Enable an event
143 *
144 * This interface function is called by the Notify_disableEvent function.
145 * Refer to its documentation for more details.
146 *
147 * The Notify module does validation of the eventId. The Notify module
148 * enters calls this function within the Notify module gate.
149 *
150 * @param(eventId) Number of event to enable
151 */
152 @DirectCall
153 Void enableEvent(UInt32 eventId);
154
155 /*! @_nodoc
156 * ======== setNotifyHandle ========
157 * Called during Notify instance creation to 'send' its handle to its
158 * corresponding notify driver instance
159 */
160 @DirectCall
161 Void setNotifyHandle(Ptr driverHandle);
162
163 }