Staging: epl: run Lindent on *.c files
[linux-2.6] / drivers / staging / epl / EplTimeruNull.c
1 /****************************************************************************
2
3   (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
4       www.systec-electronic.com
5
6   Project:      openPOWERLINK
7
8   Description:  source file for Epl Userspace-Timermodule NULL-Implementation
9
10   License:
11
12     Redistribution and use in source and binary forms, with or without
13     modification, are permitted provided that the following conditions
14     are met:
15
16     1. Redistributions of source code must retain the above copyright
17        notice, this list of conditions and the following disclaimer.
18
19     2. Redistributions in binary form must reproduce the above copyright
20        notice, this list of conditions and the following disclaimer in the
21        documentation and/or other materials provided with the distribution.
22
23     3. Neither the name of SYSTEC electronic GmbH nor the names of its
24        contributors may be used to endorse or promote products derived
25        from this software without prior written permission. For written
26        permission, please contact info@systec-electronic.com.
27
28     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31     FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32     COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34     BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37     LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38     ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39     POSSIBILITY OF SUCH DAMAGE.
40
41     Severability Clause:
42
43         If a provision of this License is or becomes illegal, invalid or
44         unenforceable in any jurisdiction, that shall not affect:
45         1. the validity or enforceability in that jurisdiction of any other
46            provision of this License; or
47         2. the validity or enforceability in other jurisdictions of that or
48            any other provision of this License.
49
50   -------------------------------------------------------------------------
51
52                 $RCSfile: EplTimeruNull.c,v $
53
54                 $Author: D.Krueger $
55
56                 $Revision: 1.3 $  $Date: 2008/04/17 21:36:32 $
57
58                 $State: Exp $
59
60                 Build Environment:
61                 KEIL uVision 2
62
63   -------------------------------------------------------------------------
64
65   Revision History:
66
67   2006/07/06 k.t.:   start of the implementation
68
69 ****************************************************************************/
70
71 #include "user/EplTimeru.h"
72
73 /***************************************************************************/
74 /*                                                                         */
75 /*                                                                         */
76 /*          G L O B A L   D E F I N I T I O N S                            */
77 /*                                                                         */
78 /*                                                                         */
79 /***************************************************************************/
80
81 //---------------------------------------------------------------------------
82 // const defines
83 //---------------------------------------------------------------------------
84
85 //---------------------------------------------------------------------------
86 // local types
87 //---------------------------------------------------------------------------
88
89 //---------------------------------------------------------------------------
90 // modul globale vars
91 //---------------------------------------------------------------------------
92
93 //---------------------------------------------------------------------------
94 // local function prototypes
95 //---------------------------------------------------------------------------
96
97 /***************************************************************************/
98 /*                                                                         */
99 /*                                                                         */
100 /*          C L A S S  <Epl Userspace-Timermodule NULL-Implementation>     */
101 /*                                                                         */
102 /*                                                                         */
103 /***************************************************************************/
104 //
105 // Description: Epl Userspace-Timermodule NULL-Implementation
106 //
107 //
108 /***************************************************************************/
109
110 //=========================================================================//
111 //                                                                         //
112 //          P U B L I C   F U N C T I O N S                                //
113 //                                                                         //
114 //=========================================================================//
115
116 //---------------------------------------------------------------------------
117 //
118 // Function:    EplTimeruInit
119 //
120 // Description: function init first instance
121 //
122 //
123 //
124 // Parameters:
125 //
126 //
127 // Returns:     tEplKernel  = errorcode
128 //
129 //
130 // State:
131 //
132 //---------------------------------------------------------------------------
133 tEplKernel PUBLIC EplTimeruInit()
134 {
135         tEplKernel Ret;
136
137         Ret = EplTimeruAddInstance();
138
139         return Ret;
140 }
141
142 //---------------------------------------------------------------------------
143 //
144 // Function:    EplTimeruAddInstance
145 //
146 // Description: function init additional instance
147 //
148 //
149 //
150 // Parameters:
151 //
152 //
153 // Returns:     tEplKernel  = errorcode
154 //
155 //
156 // State:
157 //
158 //---------------------------------------------------------------------------
159 tEplKernel PUBLIC EplTimeruAddInstance()
160 {
161         tEplKernel Ret;
162
163         Ret = kEplSuccessful;
164
165         return Ret;
166 }
167
168 //---------------------------------------------------------------------------
169 //
170 // Function:    EplTimeruDelInstance
171 //
172 // Description: function delte instance
173 //              -> under Win32 nothing to do
174 //              -> no instnace table needed
175 //
176 //
177 //
178 // Parameters:
179 //
180 //
181 // Returns:     tEplKernel  = errorcode
182 //
183 //
184 // State:
185 //
186 //---------------------------------------------------------------------------
187 tEplKernel PUBLIC EplTimeruDelInstance()
188 {
189         tEplKernel Ret;
190
191         Ret = kEplSuccessful;
192
193         return Ret;
194 }
195
196 //---------------------------------------------------------------------------
197 //
198 // Function:    EplTimeruSetTimerMs
199 //
200 // Description: function create a timer and return a handle to the pointer
201 //
202 //
203 //
204 // Parameters:  pTimerHdl_p = pointer to a buffer to fill in the handle
205 //              ulTime_p    = time for timer in ms
206 //              Argument_p  = argument for timer
207 //
208 //
209 // Returns:     tEplKernel  = errorcode
210 //
211 //
212 // State:
213 //
214 //---------------------------------------------------------------------------
215 tEplKernel PUBLIC EplTimeruSetTimerMs(tEplTimerHdl * pTimerHdl_p,
216                                       unsigned long ulTime_p,
217                                       tEplTimerArg Argument_p)
218 {
219         tEplKernel Ret;
220
221         Ret = kEplSuccessful;
222
223         // check handle
224         if (pTimerHdl_p == NULL) {
225                 Ret = kEplTimerInvalidHandle;
226                 goto Exit;
227         }
228
229       Exit:
230         return Ret;
231 }
232
233  //---------------------------------------------------------------------------
234 //
235 // Function:    EplTimeruModifyTimerMs
236 //
237 // Description: function change a timer and return a handle to the pointer
238 //
239 //
240 //
241 // Parameters:  pTimerHdl_p = pointer to a buffer to fill in the handle
242 //              ulTime_p    = time for timer in ms
243 //              Argument_p  = argument for timer
244 //
245 //
246 // Returns:     tEplKernel  = errorcode
247 //
248 //
249 // State:
250 //
251 //---------------------------------------------------------------------------
252 tEplKernel PUBLIC EplTimeruModifyTimerMs(tEplTimerHdl * pTimerHdl_p,
253                                          unsigned long ulTime_p,
254                                          tEplTimerArg Argument_p)
255 {
256         tEplKernel Ret;
257
258         Ret = kEplSuccessful;
259
260         // check parameter
261         if (pTimerHdl_p == NULL) {
262                 Ret = kEplTimerInvalidHandle;
263                 goto Exit;
264         }
265
266       Exit:
267         return Ret;
268 }
269
270  //---------------------------------------------------------------------------
271 //
272 // Function:    EplTimeruDeleteTimer
273 //
274 // Description: function delte a timer
275 //
276 //
277 //
278 // Parameters:  pTimerHdl_p = pointer to a buffer to fill in the handle
279 //
280 //
281 // Returns:     tEplKernel  = errorcode
282 //
283 //
284 // State:
285 //
286 //---------------------------------------------------------------------------
287 tEplKernel PUBLIC EplTimeruDeleteTimer(tEplTimerHdl * pTimerHdl_p)
288 {
289         tEplKernel Ret;
290
291         Ret = kEplSuccessful;
292
293         // check parameter
294         if (pTimerHdl_p == NULL) {
295                 Ret = kEplTimerInvalidHandle;
296                 goto Exit;
297         }
298         // set handle invalide
299         *pTimerHdl_p = 0;
300
301       Exit:
302         return Ret;
303
304 }
305
306 //=========================================================================//
307 //                                                                         //
308 //          P R I V A T E   F U N C T I O N S                              //
309 //                                                                         //
310 //=========================================================================//
311
312 // EOF