API
For Arduino developers
Functions
NexHardware.cpp File Reference

Hardware Srial API. More...

#include "NexHardware.h"

Go to the source code of this file.

Functions

bool recvRetNumber (uint32_t *number, uint32_t timeout)
 Receive uint32_t data. More...
 
uint16_t recvRetString (char *buffer, uint16_t len, uint32_t timeout)
 Receive string data. More...
 
void sendCommand (const char *cmd)
 Send command to Nextion. More...
 
bool recvRetCommandFinished (uint32_t timeout)
 Command is executed successfully. More...
 
bool nexInit (void)
 Init Nextion's baudrate,page id. More...
 
void nexLoop (NexTouch **nex_listen_list)
 Call mainEventLoop,watting for Nextion's touch event. More...
 

Detailed Description

Hardware Srial API.

Author
Wu Pengfei (email:pengf.nosp@m.ei.w.nosp@m.u@ite.nosp@m.ad.c.nosp@m.c)
Date
2015/8/11

Definition in file NexHardware.cpp.

Function Documentation

bool recvRetCommandFinished ( uint32_t  timeout)

Command is executed successfully.

Parameters
timeout- set timeout time.
Return values
true- success.
false- failed.

Definition at line 187 of file NexHardware.cpp.

bool recvRetNumber ( uint32_t *  number,
uint32_t  timeout 
)

Receive uint32_t data.

Parameters
number- save uint32_t data.
timeout- set timeout time.
Return values
true- success.
false- failed.

Definition at line 45 of file NexHardware.cpp.

uint16_t recvRetString ( char *  buffer,
uint16_t  len,
uint32_t  timeout 
)

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 97 of file NexHardware.cpp.

void sendCommand ( const char *  cmd)

Send command to Nextion.

Parameters
cmd- the string of command.

Definition at line 164 of file NexHardware.cpp.