gfatimer.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // gfatimer.h :
  2. //
  3. #if !defined(AGD_GFATIMER_H__60DC793C_D443_45EB_AD2F_D947862C2060__INCLUDED_)
  4. #define AGD_GFATIMER_H__60DC793C_D443_45EB_AD2F_D947862C2060__INCLUDED_
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif // __cplusplus
  8. /////////////////////////////////////////////////////////////////////////////
  9. // gfatimer.h - Declarations:
  10. typedef enum GfaTimerResolution
  11. {
  12. GTR_Invalid,
  13. GTR_10ms,
  14. GTR_25ms,
  15. GTR_50ms
  16. }GfaTimerResolution;
  17. /////////////////////////////////////////////////////////////////////////////
  18. typedef enum GfaTimerClockPulse
  19. {
  20. GTCP_250ms,
  21. GTCP_500ms,
  22. GTCP_750ms,
  23. GTCP_1000ms,
  24. GTCP_1500ms,
  25. GTCP_2000ms,
  26. GTCP_5000ms,
  27. GTCP_10000ms
  28. }GfaTimerClockPulse;
  29. /////////////////////////////////////////////////////////////////////////////
  30. // initialization (if GfaTimerRelease is not called explicitly, clean up will
  31. // be done internally, if the process exits gracefully)
  32. int GfaTimerInit(int nTimerCount, GfaTimerResolution res);
  33. void GfaTimerRelease(void);
  34. /////////////////////////////////////////////////////////////////////////////
  35. // mondial legacy timer API
  36. int tf_test(int tnum);
  37. void tf_set(int tnum);
  38. void tf_clear(int tnum);
  39. void tf_store(int tnum, int fset);
  40. unsigned long tw_read(int tnum);
  41. void tw_set(int tnum, unsigned long val); // val in milliseconds
  42. /////////////////////////////////////////////////////////////////////////////
  43. // test clock pulse (see GfaTimerClockPulse enumeration for possible values)
  44. int cp_test(GfaTimerClockPulse cp);
  45. /////////////////////////////////////////////////////////////////////////////
  46. #ifdef __cplusplus
  47. }
  48. #endif // __cplusplus
  49. #endif // !defined(AGD_GFATIMER_H__60DC793C_D443_45EB_AD2F_D947862C2060__INCLUDED_)