sktimer.h 3.0 KB

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