blob: 36f8ccb6af58bd4dfaf3b7d8d32102ebec14e71d [file] [log] [blame]
wdenkeb20ad32003-09-05 23:19:14 +00001/******************************************************************************
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.
wdenk9c53f402003-10-15 23:53:47 +000032 *
wdenkeb20ad32003-09-05 23:19:14 +000033 * Revision 1.8 1998/09/08 08:48:02 gklug
34 * add: init level handling
wdenk9c53f402003-10-15 23:53:47 +000035 *
wdenkeb20ad32003-09-05 23:19:14 +000036 * Revision 1.7 1998/08/20 12:31:29 gklug
37 * fix: SK_TIMCTRL needs to be defined
wdenk9c53f402003-10-15 23:53:47 +000038 *
wdenkeb20ad32003-09-05 23:19:14 +000039 * Revision 1.6 1998/08/19 09:51:00 gklug
40 * fix: remove struct keyword from c-code (see CCC) add typedefs
wdenk9c53f402003-10-15 23:53:47 +000041 *
wdenkeb20ad32003-09-05 23:19:14 +000042 * 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
wdenk9c53f402003-10-15 23:53:47 +000044 *
wdenkeb20ad32003-09-05 23:19:14 +000045 * Revision 1.4 1998/08/14 07:09:31 gklug
46 * fix: chg pAc -> pAC
wdenk9c53f402003-10-15 23:53:47 +000047 *
wdenkeb20ad32003-09-05 23:19:14 +000048 * Revision 1.3 1998/08/07 12:54:24 gklug
49 * fix: first compiled version
wdenk9c53f402003-10-15 23:53:47 +000050 *
wdenkeb20ad32003-09-05 23:19:14 +000051 * Revision 1.2 1998/08/07 09:35:29 gklug
52 * add: Timer control struct for Adapters context
53 * add: function prototypes
wdenk9c53f402003-10-15 23:53:47 +000054 *
wdenkeb20ad32003-09-05 23:19:14 +000055 * Revision 1.1 1998/08/05 11:27:01 gklug
56 * First version: adapted from SMT
wdenk9c53f402003-10-15 23:53:47 +000057 *
wdenkeb20ad32003-09-05 23:19:14 +000058 *
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 */
75typedef struct s_Timer SK_TIMER;
76
77struct 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 */
90typedef struct s_TimCtrl {
91 SK_TIMER *StQueue ; /* Head of Timer queue */
92} SK_TIMCTRL ;
93
94extern void SkTimerInit(SK_AC *pAC,SK_IOC Ioc, int Level);
95extern void SkTimerStop(SK_AC *pAC,SK_IOC Ioc,SK_TIMER *pTimer);
96extern void SkTimerStart(SK_AC *pAC,SK_IOC Ioc,SK_TIMER *pTimer,
97 SK_U32 Time,SK_U32 Class,SK_U32 Event,SK_EVPARA Para);
98extern void SkTimerDone(SK_AC *pAC,SK_IOC Ioc);
99#endif /* _SKTIMER_H_ */