1 /******************************************************************************
4 * Project: Gigabit Ethernet Adapters, Event Scheduler Module
5 * Version: $Revision: 1.11 $
6 * Date: $Date: 2003/09/16 12:58:18 $
7 * Purpose: Defines for the timer functions
9 ******************************************************************************/
11 /******************************************************************************
13 * (C)Copyright 1998-2002 SysKonnect GmbH.
14 * (C)Copyright 2002-2003 Marvell.
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.
21 * The information in this file is provided "AS IS" without warranty.
23 ******************************************************************************/
26 * SKTIMER.H contains all defines and types for the timer functions
32 #include "h/skqueue.h"
36 * - needed wherever a timer is used. Put this in your data structure
39 typedef struct s_Timer SK_TIMER
;
42 SK_TIMER
*TmNext
; /* linked list */
43 SK_U32 TmClass
; /* Timer Event class */
44 SK_U32 TmEvent
; /* Timer Event value */
45 SK_EVPARA TmPara
; /* Timer Event parameter */
46 SK_U32 TmDelta
; /* delta time */
47 int TmActive
; /* flag: active/inactive */
51 * Timer control struct.
52 * - use in Adapters context name pAC->Tim
54 typedef struct s_TimCtrl
{
55 SK_TIMER
*StQueue
; /* Head of Timer queue */
58 extern void SkTimerInit(SK_AC
*pAC
, SK_IOC Ioc
, int Level
);
59 extern void SkTimerStop(SK_AC
*pAC
, SK_IOC Ioc
, SK_TIMER
*pTimer
);
60 extern void SkTimerStart(SK_AC
*pAC
, SK_IOC Ioc
, SK_TIMER
*pTimer
,
61 SK_U32 Time
, SK_U32 Class
, SK_U32 Event
, SK_EVPARA Para
);
62 extern void SkTimerDone(SK_AC
*pAC
, SK_IOC Ioc
);
63 #endif /* _SKTIMER_H_ */