Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
NexTouch.h
1 
17 #ifndef __NEXTOUCH_H__
18 #define __NEXTOUCH_H__
19 
20 #include <Arduino.h>
21 #include "NexConfig.h"
22 #include "NexObject.h"
23 
32 #define NEX_EVENT_PUSH (0x01)
33 
37 #define NEX_EVENT_POP (0x00)
38 
45 typedef void (*NexTouchEventCb)(void *ptr);
46 
53 class NexTouch: public NexObject
54 {
55 public: /* static methods */
56  static void iterate(NexTouch **list, uint8_t pid, uint8_t cid, int32_t event);
57 
58 public: /* methods */
59 
63  NexTouch(uint8_t pid, uint8_t cid, const char *name);
64 
74  void attachPush(NexTouchEventCb push, void *ptr = NULL);
75 
81  void detachPush(void);
82 
92  void attachPop(NexTouchEventCb pop, void *ptr = NULL);
93 
99  void detachPop(void);
100 
101 private: /* methods */
102  void push(void);
103  void pop(void);
104 
105 private: /* data */
106  NexTouchEventCb __cb_push;
107  void *__cbpush_ptr;
108  NexTouchEventCb __cb_pop;
109  void *__cbpop_ptr;
110 };
111 
116 #endif /* #ifndef __NEXTOUCH_H__ */
Definition: NexTouch.h:53
void detachPush(void)
void detachPop(void)
Definition: NexObject.h:32
void attachPush(NexTouchEventCb push, void *ptr=NULL)
void(* NexTouchEventCb)(void *ptr)
Definition: NexTouch.h:45
NexTouch(uint8_t pid, uint8_t cid, const char *name)
void attachPop(NexTouchEventCb pop, void *ptr=NULL)