Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[deliverable/linux.git] / drivers / staging / epl / EplTimeruNull.c
CommitLineData
9d7164cf
DK
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//---------------------------------------------------------------------------
133tEplKernel PUBLIC EplTimeruInit()
134{
833dfbe7 135 tEplKernel Ret;
9d7164cf 136
833dfbe7 137 Ret = EplTimeruAddInstance();
9d7164cf 138
833dfbe7 139 return Ret;
9d7164cf
DK
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//---------------------------------------------------------------------------
159tEplKernel PUBLIC EplTimeruAddInstance()
160{
833dfbe7 161 tEplKernel Ret;
9d7164cf 162
833dfbe7 163 Ret = kEplSuccessful;
9d7164cf 164
833dfbe7 165 return Ret;
9d7164cf
DK
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//---------------------------------------------------------------------------
187tEplKernel PUBLIC EplTimeruDelInstance()
188{
833dfbe7 189 tEplKernel Ret;
9d7164cf 190
833dfbe7 191 Ret = kEplSuccessful;
9d7164cf 192
833dfbe7 193 return Ret;
9d7164cf
DK
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//---------------------------------------------------------------------------
833dfbe7
GKH
215tEplKernel PUBLIC EplTimeruSetTimerMs(tEplTimerHdl * pTimerHdl_p,
216 unsigned long ulTime_p,
217 tEplTimerArg Argument_p)
9d7164cf 218{
833dfbe7 219 tEplKernel Ret;
9d7164cf 220
833dfbe7 221 Ret = kEplSuccessful;
9d7164cf 222
833dfbe7
GKH
223 // check handle
224 if (pTimerHdl_p == NULL) {
225 Ret = kEplTimerInvalidHandle;
226 goto Exit;
227 }
9d7164cf 228
833dfbe7
GKH
229 Exit:
230 return Ret;
9d7164cf
DK
231}
232
9d7164cf
DK
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//---------------------------------------------------------------------------
833dfbe7
GKH
252tEplKernel PUBLIC EplTimeruModifyTimerMs(tEplTimerHdl * pTimerHdl_p,
253 unsigned long ulTime_p,
254 tEplTimerArg Argument_p)
9d7164cf 255{
833dfbe7 256 tEplKernel Ret;
9d7164cf 257
833dfbe7 258 Ret = kEplSuccessful;
9d7164cf 259
833dfbe7
GKH
260 // check parameter
261 if (pTimerHdl_p == NULL) {
262 Ret = kEplTimerInvalidHandle;
263 goto Exit;
264 }
9d7164cf 265
833dfbe7
GKH
266 Exit:
267 return Ret;
9d7164cf
DK
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//---------------------------------------------------------------------------
833dfbe7 287tEplKernel PUBLIC EplTimeruDeleteTimer(tEplTimerHdl * pTimerHdl_p)
9d7164cf 288{
833dfbe7 289 tEplKernel Ret;
9d7164cf 290
833dfbe7 291 Ret = kEplSuccessful;
9d7164cf 292
833dfbe7
GKH
293 // check parameter
294 if (pTimerHdl_p == NULL) {
295 Ret = kEplTimerInvalidHandle;
296 goto Exit;
297 }
298 // set handle invalide
299 *pTimerHdl_p = 0;
9d7164cf 300
833dfbe7
GKH
301 Exit:
302 return Ret;
9d7164cf
DK
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
9d7164cf 312// EOF
This page took 0.050871 seconds and 5 git commands to generate.