Documentation
For Arduino users
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 
105  uint32_t Get_cycle_tim(uint32_t *number);
106 
113  bool Set_cycle_tim(uint32_t number);
114 };
120 #endif /* #ifndef __NEXTIMER_H__ */
uint32_t Get_cycle_tim(uint32_t *number)
Get tim attribute of component.
Definition: NexTimer.cpp:86
bool enable(void)
contorl timer enable.
Definition: NexTimer.cpp:60
void(* NexTouchEventCb)(void *ptr)
Type of callback funciton when an touch event occurs.
Definition: NexTouch.h:45
void detachTimer(void)
Detach an callback function.
Definition: NexTimer.cpp:28
NexTimer(uint8_t pid, uint8_t cid, const char *name)
Constructor.
Definition: NexTimer.cpp:18
bool getCycle(uint32_t *number)
Get the value of timer cycle val.
Definition: NexTimer.cpp:33
The definition of class NexTouch.
bool Set_cycle_tim(uint32_t number)
Set tim attribute of component.
Definition: NexTimer.cpp:95
The definition of base API for using Nextion.
bool setCycle(uint32_t number)
Set the value of timer cycle val.
Definition: NexTimer.cpp:42
NexTimer component.
Definition: NexTimer.h:34
void attachTimer(NexTouchEventCb timer, void *ptr=NULL)
Attach an callback function of timer respond event.
Definition: NexTimer.cpp:23
Father class of the components with touch events.
Definition: NexTouch.h:53
bool disable(void)
contorl timer disable.
Definition: NexTimer.cpp:73