Root Class of Nextion Components.
More...
#include <NexTouch.h>
|
| | NexTouch (NexPid pid, NexCid cid, char *name, NexTouchEventCb pop=NULL, void *pop_ptr=NULL, NexTouchEventCb push=NULL, void *push_ptr=NULL) |
| | Constructor of Nextouch. More...
|
| |
| NexPid | getPid (void) |
| | Get page id. More...
|
| |
| NexCid | getCid (void) |
| | Get component id. More...
|
| |
| const char * | getObjName (void) |
| | Get component name. More...
|
| |
|
void | print (void) |
| | Print current object address,page id,component id, component name,pop event function address,push event function address.
|
| |
| NexTouch::NexTouch |
( |
NexPid |
pid, |
|
|
NexCid |
cid, |
|
|
char * |
name, |
|
|
NexTouchEventCb |
pop = NULL, |
|
|
void * |
pop_ptr = NULL, |
|
|
NexTouchEventCb |
push = NULL, |
|
|
void * |
push_ptr = NULL |
|
) |
| |
Constructor of Nextouch.
- Parameters
-
| pid | - page id. |
| cid | - component id. |
| name | - component name. |
| pop | - pop event function pointer. |
| pop_ptr | - the parameter was transmitted to pop event function pointer. |
| push | - push event function pointer. |
| push_ptr | - the parameter was transmitted to push event function pointer. |
Definition at line 74 of file NexTouch.cpp.
| NexCid NexTouch::getCid |
( |
void |
| ) |
|
Get component id.
- Returns
- the id of component.
Definition at line 102 of file NexTouch.cpp.
| const char * NexTouch::getObjName |
( |
void |
| ) |
|
Get component name.
- Returns
- the name of component.
Definition at line 112 of file NexTouch.cpp.
| NexPid NexTouch::getPid |
( |
void |
| ) |
|
Get page id.
- Returns
- the id of page.
Definition at line 92 of file NexTouch.cpp.
| uint8_t NexTouch::mainEventLoop |
( |
NexTouch ** |
list | ) |
|
|
static |
Watting for Nextion's touch event.
- Parameters
-
| list | - index to Nextion Components list. |
Definition at line 26 of file NexTouch.cpp.
| bool NexTouch::recvRetCommandFinished |
( |
uint32_t |
timeout = 100 | ) |
|
|
static |
Command is executed successfully.
- Parameters
-
| timeout | - set timeout time. |
- Return values
-
| true | - success. |
| false | - failed. |
Definition at line 224 of file NexTouch.cpp.
| bool NexTouch::recvRetNumber |
( |
uint32_t * |
number, |
|
|
uint32_t |
timeout = 500 |
|
) |
| |
|
static |
Receive uint32_t data.
- Parameters
-
| number | - save uint32_t data. |
| timeout | - set timeout time. |
- Return values
-
| true | - success. |
| false | - failed. |
Definition at line 356 of file NexTouch.cpp.
| uint16_t NexTouch::recvRetString |
( |
char * |
buffer, |
|
|
uint16_t |
len, |
|
|
uint32_t |
timeout = 500 |
|
) |
| |
|
static |
Receive string data.
- Parameters
-
| buffer | - save string data. |
| len | - string buffer length. |
| timeout | - set timeout time. |
- Returns
- the length of string buffer.
Definition at line 284 of file NexTouch.cpp.
| void NexTouch::sendCommand |
( |
const char * |
cmd | ) |
|
|
static |
Send command to Nextion.
- Parameters
-
| cmd | - the string of command. |
Definition at line 261 of file NexTouch.cpp.
The documentation for this class was generated from the following files: