00001 00012 #ifndef _MM_TIMER_H_ 00013 #define _MM_TIMER_H_ 00014 00024 /* 00025 * INCLUDE FILES 00026 **************************************************************************************** 00027 */ 00028 // standard includes 00029 #include "co_int.h" 00030 #include "co_bool.h" 00031 00032 // for target dependent directives 00033 #include "rwnx_config.h" 00034 #include "reg_mac_core.h" 00035 00036 #include "co_list.h" 00037 00038 #if NX_MM_TIMER 00039 /* 00040 * DEFINES 00041 **************************************************************************************** 00042 */ 00044 typedef void (*cb_timer_func_ptr)(void *); 00045 00047 struct mm_timer_tag 00048 { 00050 struct co_list_hdr list_hdr; 00052 cb_timer_func_ptr cb; 00054 void *env; 00056 uint32_t time; 00057 }; 00058 00060 struct mm_timer_env_tag 00061 { 00063 struct co_list prog; 00064 }; 00065 00066 /* 00067 * GLOBAL VARIABLES 00068 **************************************************************************************** 00069 */ 00070 extern struct mm_timer_env_tag mm_timer_env; 00071 00072 /* 00073 * FUNCTION PROTOTYPES 00074 **************************************************************************************** 00075 */ 00082 void mm_timer_init(void); 00083 00084 00094 void mm_timer_set(struct mm_timer_tag *timer, uint32_t value); 00095 00096 00107 void mm_timer_clear(struct mm_timer_tag *timer); 00108 00118 void mm_timer_schedule(int dummy); 00119 00120 #endif 00121 00122 00124 00125 #endif // _MM_TIMER_H_
1.6.1