]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/sk98lin/h/sktimer.h
* Patches by Xianghua Xiao, 15 Oct 2003:
[karo-tx-uboot.git] / drivers / sk98lin / h / sktimer.h
1 /******************************************************************************
2  *
3  * Name:        sktimer.h
4  * Project:     GEnesis, PCI Gigabit Ethernet Adapter
5  * Version:     $Revision: 1.9 $
6  * Date:        $Date: 1999/11/22 14:00:29 $
7  * Purpose:     Defines for the timer functions
8  *
9  ******************************************************************************/
10
11 /******************************************************************************
12  *
13  *      (C)Copyright 1998,1999 SysKonnect,
14  *      a business unit of Schneider & Koch & Co. Datensysteme GmbH.
15  *
16  *      This program is free software; you can redistribute it and/or modify
17  *      it under the terms of the GNU General Public License as published by
18  *      the Free Software Foundation; either version 2 of the License, or
19  *      (at your option) any later version.
20  *
21  *      The information in this file is provided "AS IS" without warranty.
22  *
23  ******************************************************************************/
24
25 /******************************************************************************
26  *
27  * History:
28  *
29  *      $Log: sktimer.h,v $
30  *      Revision 1.9  1999/11/22 14:00:29  cgoos
31  *      Changed license header to GPL.
32  *
33  *      Revision 1.8  1998/09/08 08:48:02  gklug
34  *      add: init level handling
35  *
36  *      Revision 1.7  1998/08/20 12:31:29  gklug
37  *      fix: SK_TIMCTRL needs to be defined
38  *
39  *      Revision 1.6  1998/08/19 09:51:00  gklug
40  *      fix: remove struct keyword from c-code (see CCC) add typedefs
41  *
42  *      Revision 1.5  1998/08/17 13:43:21  gklug
43  *      chg: Parameter will be union of 64bit para, 2 times SK_U32 or SK_PTR
44  *
45  *      Revision 1.4  1998/08/14 07:09:31  gklug
46  *      fix: chg pAc -> pAC
47  *
48  *      Revision 1.3  1998/08/07 12:54:24  gklug
49  *      fix: first compiled version
50  *
51  *      Revision 1.2  1998/08/07 09:35:29  gklug
52  *      add: Timer control struct for Adapters context
53  *      add: function prototypes
54  *
55  *      Revision 1.1  1998/08/05 11:27:01  gklug
56  *      First version: adapted from SMT
57  *
58  *
59  ******************************************************************************/
60
61 /*
62  * SKTIMER.H    contains all defines and types for the timer functions
63  */
64
65 #ifndef _SKTIMER_H_
66 #define _SKTIMER_H_
67
68 #include "h/skqueue.h"
69
70 /*
71  * SK timer
72  * - needed wherever a timer is used. Put this in your data structure
73  *   wherever you want.
74  */
75 typedef struct s_Timer SK_TIMER;
76
77 struct s_Timer {
78         SK_TIMER        *TmNext ;       /* linked list */
79         SK_U32          TmClass ;       /* Timer Event class */
80         SK_U32          TmEvent ;       /* Timer Event value */
81         SK_EVPARA       TmPara ;        /* Timer Event parameter */
82         SK_U32          TmDelta ;       /* delta time */
83         int             TmActive ;      /* flag : active/inactive */
84 } ;
85
86 /*
87  * Timer control struct.
88  * - use in Adapters context name pAC->Tim
89  */
90 typedef struct s_TimCtrl {
91         SK_TIMER        *StQueue ;      /* Head of Timer queue */
92 } SK_TIMCTRL ;
93
94 extern void SkTimerInit(SK_AC *pAC,SK_IOC Ioc, int Level);
95 extern void SkTimerStop(SK_AC *pAC,SK_IOC Ioc,SK_TIMER *pTimer);
96 extern void SkTimerStart(SK_AC *pAC,SK_IOC Ioc,SK_TIMER *pTimer,
97         SK_U32 Time,SK_U32 Class,SK_U32 Event,SK_EVPARA Para);
98 extern void SkTimerDone(SK_AC *pAC,SK_IOC Ioc);
99 #endif  /* _SKTIMER_H_ */