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 * ======== INotifyDriver ========
39 * Notify driver interface
40 *
41 * Interface implemented by all drivers for the notify module. Modules that
42 * implement this interface expect the eventId arguments to be valid.
43 */
44
45 interface INotifyDriver {
46
47 instance:
48
49 /*!
50 * ======== registerEvent ========
51 * Register a callback to an event
52 *
53 * This driver function is called by the Notify_registerEvent function
54 * within the Notify module gate. Refer to its documentation for more
55 * details.
56 *
57 * @param(eventId) Number of event that is being registered
58 */
59 Void registerEvent(UInt32 eventId);
60
61 /*!
62 * ======== unregisterEvent ========
63 * Remove an event listener from an event
64 *
65 * This driver function is called by the Notify_unregisterEvent function
66 * within the Notify module gate. Refer to it for more details.
67 *
68 * @param(eventId) Number of event that is being unregistered
69 */
70 Void unregisterEvent(UInt32 eventId);
71
72 /*!
73 * ======== sendEvent ========
74 * Send a signal to an event
75 *
76 * This interface function is called by the Notify_sendEvent function.
77 * Notify_sendEvent does not provide any context protection for
78 * INotifyDriver_sendEvent, so appropriate measures must be taken within
79 * the driver itself.
80 *
81 * @param(eventId) Number of event to signal
82 * @param(payload) Payload (optional) to pass to callback function
83 * @param(waitClear) If TRUE, have the NotifyDriver wait for
84 * acknowledgement back from the destination
85 * processor.
86 *
87 * @b(returns) Notify status
88 */
89 Int sendEvent(UInt32 eventId, UInt32 payload, Bool waitClear);
90
91 /*!
92 * ======== disable ========
93 * Disable a NotifyDriver instance
94 *
95 * Disables the ability of a Notify driver to receive events for a given
96 * processor. This interface function is called by the Notify_disable
97 * function. Refer to its documentation for more details.
98 */
99 Void disable();
100
101 /*!
102 * ======== enable ========
103 * Enable a NotifyDriver instance
104 *
105 * Enables the ability of a Notify driver to receive events for a given
106 * processor. This interface function is called by the Notify_restore
107 * function. Refer to its documentation for more details.
108 */
109 Void enable();
110
111 /*!
112 * ======== disableEvent ========
113 * Disable an event
114 *
115 * This interface function is called by the Notify_disableEvent function.
116 * Refer to its documentation for more details.
117 *
118 * The Notify module does validation of the eventId. The Notify module
119 * enters calls this function within the Notify module gate.
120 *
121 * @param(eventId) Number of event to disable
122 */
123 Void disableEvent(UInt32 eventId);
124
125 /*!
126 * ======== enableEvent ========
127 * Enable 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 enable
136 */
137 Void enableEvent(UInt32 eventId);
138
139 /*! @_nodoc
140 * ======== setNotifyHandle ========
141 * Called during Notify instance creation to 'send' its handle to its
142 * corresponding notify driver instance
143 */
144 Void setNotifyHandle(Ptr driverHandle);
145
146 }
147 148 149
150