00001 /*@{*//*@}*/ 00009 00010 #ifndef TIMER_H 00011 #define TIMER_H 00012 00013 #ifdef EXPORT 00014 #define EXTERN 00015 #else 00016 #define EXTERN extern 00017 #endif 00018 00019 /******************************************************************************/ 00020 /* Constants (#define) *//*@{*/ 00021 00023 #define NO_TICK 0U 00024 00026 #define TICK128 1U 00027 00029 #define TICK256 2U 00030 00032 #define TICK512 4U 00033 00035 #define TICK1024 8U 00036 00037 /* End: define Constants *//*@}*/ 00038 /******************************************************************************/ 00039 00040 /******************************************************************************/ 00041 /* Macro definitions (#define) *//*@{*/ 00042 00044 #define TIMER_IS_TICK128() ((timer_GetTicks() & TICK128) != NO_TICK) 00045 00047 #define TIMER_IS_TICK256() ((timer_GetTicks() & TICK256) != NO_TICK) 00048 00050 #define TIMER_IS_TICK512() ((timer_GetTicks() & TICK512) != NO_TICK) 00051 00053 #define TIMER_IS_TICK1024() ((timer_GetTicks() & TICK1024) != NO_TICK) 00054 00055 /* End: Macro definitions (#define) *//*@}*/ 00056 /******************************************************************************/ 00057 00058 /******************************************************************************/ 00059 /* Basic types (typedef) *//*@{*/ 00060 /* End: Basic types (typedef) *//*@}*/ 00061 /******************************************************************************/ 00062 00063 /******************************************************************************/ 00064 /* Global variables/constan. *//*@{*/ 00065 /* End: Global variables *//*@}*/ 00066 /******************************************************************************/ 00067 00068 /******************************************************************************/ 00069 /* Prototype declarations */ 00070 00071 EXTERN void timer_Init (void); 00072 EXTERN UINT32 timer_GetSystemTime (void); 00073 EXTERN void timer_LockTicks (void); 00074 EXTERN UINT8 timer_GetTicks (void); 00075 00076 /* End: Prototype declarations */ 00077 /******************************************************************************/ 00078 00079 #undef EXTERN 00080 #endif /* TIMER_H */ 00081 00082 /**** Last line of code ****/