My Project
 All Classes Files Functions Typedefs Groups Pages
NexTimer.h
Go to the documentation of this file.
1 
17 #ifndef __NEXTIMER_H__
18 #define __NEXTIMER_H__
19 
20 #include "NexTouch.h"
21 #include "NexHardware.h"
34 class NexTimer: public NexTouch
35 {
36 public: /* methods */
37 
41  NexTimer(uint8_t pid, uint8_t cid, const char *name);
42 
52  void attachTimer(NexTouchEventCb timer, void *ptr = NULL);
53 
59  void detachTimer(void);
60 
69  bool getCycle(uint32_t *number);
70 
81  bool setCycle(uint32_t number);
82 
89  bool enable(void);
90 
97  bool disable(void);
98 
99  /*
100  * Get tim attribute of component
101  *
102  * @param number - buffer storing data retur
103  * @return the length of the data
104  */
105 
106  uint32_t Get_cycle_tim(uint32_t *number);
107 
108  /*
109  * Set tim attribute of component
110  *
111  * @param number - To set up the data
112  * @return true if success, false for failure
113  */
114 
115  bool Set_cycle_tim(uint32_t number);
116 
117 };
123 #endif /* #ifndef __NEXTIMER_H__ */
bool enable(void)
Definition: NexTimer.cpp:60
void(* NexTouchEventCb)(void *ptr)
Definition: NexTouch.h:45
void detachTimer(void)
Definition: NexTimer.cpp:28
NexTimer(uint8_t pid, uint8_t cid, const char *name)
Definition: NexTimer.cpp:18
bool getCycle(uint32_t *number)
Definition: NexTimer.cpp:33
bool setCycle(uint32_t number)
Definition: NexTimer.cpp:42
Definition: NexTimer.h:34
void attachTimer(NexTouchEventCb timer, void *ptr=NULL)
Definition: NexTimer.cpp:23
Definition: NexTouch.h:53
bool disable(void)
Definition: NexTimer.cpp:73