1 /****************************************************************************
3 (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
4 www.systec-electronic.com
8 Description: source file for Epl Userspace-Timermodule NULL-Implementation
12 Redistribution and use in source and binary forms, with or without
13 modification, are permitted provided that the following conditions
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.
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 $
56 $Revision: 1.3 $ $Date: 2008/04/17 21:36:32 $
63 -------------------------------------------------------------------------
67 2006/07/06 k.t.: start of the implementation
69 ****************************************************************************/
71 #include "user/EplTimeru.h"
73 /***************************************************************************/
76 /* G L O B A L D E F I N I T I O N S */
79 /***************************************************************************/
81 //---------------------------------------------------------------------------
83 //---------------------------------------------------------------------------
85 //---------------------------------------------------------------------------
87 //---------------------------------------------------------------------------
89 //---------------------------------------------------------------------------
91 //---------------------------------------------------------------------------
93 //---------------------------------------------------------------------------
94 // local function prototypes
95 //---------------------------------------------------------------------------
97 /***************************************************************************/
100 /* C L A S S <Epl Userspace-Timermodule NULL-Implementation> */
103 /***************************************************************************/
105 // Description: Epl Userspace-Timermodule NULL-Implementation
108 /***************************************************************************/
110 //=========================================================================//
112 // P U B L I C F U N C T I O N S //
114 //=========================================================================//
116 //---------------------------------------------------------------------------
118 // Function: EplTimeruInit
120 // Description: function init first instance
127 // Returns: tEplKernel = errorcode
132 //---------------------------------------------------------------------------
133 tEplKernel PUBLIC EplTimeruInit()
137 Ret = EplTimeruAddInstance();
142 //---------------------------------------------------------------------------
144 // Function: EplTimeruAddInstance
146 // Description: function init additional instance
153 // Returns: tEplKernel = errorcode
158 //---------------------------------------------------------------------------
159 tEplKernel PUBLIC EplTimeruAddInstance()
163 Ret = kEplSuccessful;
168 //---------------------------------------------------------------------------
170 // Function: EplTimeruDelInstance
172 // Description: function delte instance
173 // -> under Win32 nothing to do
174 // -> no instnace table needed
181 // Returns: tEplKernel = errorcode
186 //---------------------------------------------------------------------------
187 tEplKernel PUBLIC EplTimeruDelInstance()
191 Ret = kEplSuccessful;
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
214 //---------------------------------------------------------------------------
215 tEplKernel PUBLIC EplTimeruSetTimerMs(tEplTimerHdl* pTimerHdl_p,
216 unsigned long ulTime_p,
217 tEplTimerArg Argument_p)
222 Ret = kEplSuccessful;
225 if(pTimerHdl_p == NULL)
227 Ret = kEplTimerInvalidHandle;
236 //---------------------------------------------------------------------------
238 // Function: EplTimeruModifyTimerMs
240 // Description: function change a timer and return a handle to the pointer
244 // Parameters: pTimerHdl_p = pointer to a buffer to fill in the handle
245 // ulTime_p = time for timer in ms
246 // Argument_p = argument for timer
249 // Returns: tEplKernel = errorcode
254 //---------------------------------------------------------------------------
255 tEplKernel PUBLIC EplTimeruModifyTimerMs(tEplTimerHdl* pTimerHdl_p,
256 unsigned long ulTime_p,
257 tEplTimerArg Argument_p)
261 Ret = kEplSuccessful;
264 if(pTimerHdl_p == NULL)
266 Ret = kEplTimerInvalidHandle;
275 //---------------------------------------------------------------------------
277 // Function: EplTimeruDeleteTimer
279 // Description: function delte a timer
283 // Parameters: pTimerHdl_p = pointer to a buffer to fill in the handle
286 // Returns: tEplKernel = errorcode
291 //---------------------------------------------------------------------------
292 tEplKernel PUBLIC EplTimeruDeleteTimer(tEplTimerHdl* pTimerHdl_p)
296 Ret = kEplSuccessful;
299 if(pTimerHdl_p == NULL)
301 Ret = kEplTimerInvalidHandle;
305 // set handle invalide
314 //=========================================================================//
316 // P R I V A T E F U N C T I O N S //
318 //=========================================================================//