ti_usb_3410_5052: support alternate firmware
[linux-2.6/mini2440.git] / drivers / staging / epl / EplTimeruNull.c
blob40ce403cbd034bf432b7d76b8ed7eefbee6ad5ac
1 /****************************************************************************
3 (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
4 www.systec-electronic.com
6 Project: openPOWERLINK
8 Description: source file for Epl Userspace-Timermodule NULL-Implementation
10 License:
12 Redistribution and use in source and binary forms, with or without
13 modification, are permitted provided that the following conditions
14 are met:
16 1. Redistributions of source code must retain the above copyright
17 notice, this list of conditions and the following disclaimer.
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.
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.
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.
41 Severability Clause:
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.
50 -------------------------------------------------------------------------
52 $RCSfile: EplTimeruNull.c,v $
54 $Author: D.Krueger $
56 $Revision: 1.3 $ $Date: 2008/04/17 21:36:32 $
58 $State: Exp $
60 Build Environment:
61 KEIL uVision 2
63 -------------------------------------------------------------------------
65 Revision History:
67 2006/07/06 k.t.: start of the implementation
69 ****************************************************************************/
71 #include "user/EplTimeru.h"
73 /***************************************************************************/
74 /* */
75 /* */
76 /* G L O B A L D E F I N I T I O N S */
77 /* */
78 /* */
79 /***************************************************************************/
81 //---------------------------------------------------------------------------
82 // const defines
83 //---------------------------------------------------------------------------
85 //---------------------------------------------------------------------------
86 // local types
87 //---------------------------------------------------------------------------
89 //---------------------------------------------------------------------------
90 // modul globale vars
91 //---------------------------------------------------------------------------
93 //---------------------------------------------------------------------------
94 // local function prototypes
95 //---------------------------------------------------------------------------
97 /***************************************************************************/
98 /* */
99 /* */
100 /* C L A S S <Epl Userspace-Timermodule NULL-Implementation> */
101 /* */
102 /* */
103 /***************************************************************************/
105 // Description: Epl Userspace-Timermodule NULL-Implementation
108 /***************************************************************************/
110 //=========================================================================//
111 // //
112 // P U B L I C F U N C T I O N S //
113 // //
114 //=========================================================================//
116 //---------------------------------------------------------------------------
118 // Function: EplTimeruInit
120 // Description: function init first instance
124 // Parameters:
127 // Returns: tEplKernel = errorcode
130 // State:
132 //---------------------------------------------------------------------------
133 tEplKernel PUBLIC EplTimeruInit()
135 tEplKernel Ret;
137 Ret = EplTimeruAddInstance();
139 return Ret;
142 //---------------------------------------------------------------------------
144 // Function: EplTimeruAddInstance
146 // Description: function init additional instance
150 // Parameters:
153 // Returns: tEplKernel = errorcode
156 // State:
158 //---------------------------------------------------------------------------
159 tEplKernel PUBLIC EplTimeruAddInstance()
161 tEplKernel Ret;
163 Ret = kEplSuccessful;
165 return Ret;
168 //---------------------------------------------------------------------------
170 // Function: EplTimeruDelInstance
172 // Description: function delte instance
173 // -> under Win32 nothing to do
174 // -> no instnace table needed
178 // Parameters:
181 // Returns: tEplKernel = errorcode
184 // State:
186 //---------------------------------------------------------------------------
187 tEplKernel PUBLIC EplTimeruDelInstance()
189 tEplKernel Ret;
191 Ret = kEplSuccessful;
193 return Ret;
196 //---------------------------------------------------------------------------
198 // Function: EplTimeruSetTimerMs
200 // Description: function create a timer and return a handle to the pointer
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
209 // Returns: tEplKernel = errorcode
212 // State:
214 //---------------------------------------------------------------------------
215 tEplKernel PUBLIC EplTimeruSetTimerMs(tEplTimerHdl * pTimerHdl_p,
216 unsigned long ulTime_p,
217 tEplTimerArg Argument_p)
219 tEplKernel Ret;
221 Ret = kEplSuccessful;
223 // check handle
224 if (pTimerHdl_p == NULL) {
225 Ret = kEplTimerInvalidHandle;
226 goto Exit;
229 Exit:
230 return Ret;
233 //---------------------------------------------------------------------------
235 // Function: EplTimeruModifyTimerMs
237 // Description: function change a timer and return a handle to the pointer
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
246 // Returns: tEplKernel = errorcode
249 // State:
251 //---------------------------------------------------------------------------
252 tEplKernel PUBLIC EplTimeruModifyTimerMs(tEplTimerHdl * pTimerHdl_p,
253 unsigned long ulTime_p,
254 tEplTimerArg Argument_p)
256 tEplKernel Ret;
258 Ret = kEplSuccessful;
260 // check parameter
261 if (pTimerHdl_p == NULL) {
262 Ret = kEplTimerInvalidHandle;
263 goto Exit;
266 Exit:
267 return Ret;
270 //---------------------------------------------------------------------------
272 // Function: EplTimeruDeleteTimer
274 // Description: function delte a timer
278 // Parameters: pTimerHdl_p = pointer to a buffer to fill in the handle
281 // Returns: tEplKernel = errorcode
284 // State:
286 //---------------------------------------------------------------------------
287 tEplKernel PUBLIC EplTimeruDeleteTimer(tEplTimerHdl * pTimerHdl_p)
289 tEplKernel Ret;
291 Ret = kEplSuccessful;
293 // check parameter
294 if (pTimerHdl_p == NULL) {
295 Ret = kEplTimerInvalidHandle;
296 goto Exit;
298 // set handle invalide
299 *pTimerHdl_p = 0;
301 Exit:
302 return Ret;
306 //=========================================================================//
307 // //
308 // P R I V A T E F U N C T I O N S //
309 // //
310 //=========================================================================//
312 // EOF