API
For Arduino developers
Functions
NexTouch.cpp File Reference

API of Nextion. More...

#include "NexTouch.h"

Go to the source code of this file.

Functions

bool nexInit (void)
 Init Nextion's baudrate,page id. More...
 
bool nexLoop (NexTouch **nexListenList)
 Call mainEventLoop,watting for Nextion's touch event. More...
 
bool sendCurrentPageId (uint8_t *pageId)
 Return current page id. More...
 
bool touchCalibration (void)
 Touch screen calibration. More...
 
bool disableTouchFocus (void)
 Disable all touch hot. More...
 
bool pauseSerialCommand (void)
 Pause serial instruction execution. More...
 
bool recoverySerialCommand (void)
 Recovery serial instruction execution. More...
 
bool setCurrentBrightness (uint8_t dimValue)
 Set current backlight brightness value. More...
 
bool setDefaultBrightness (uint8_t dimDefaultValue)
 Set default backlight brightness value. More...
 
bool sleepMode (uint8_t mode)
 Set device in sleep mode. More...
 
bool setCurrentBaudrate (uint32_t baudrate)
 Set current baudrate. More...
 
bool setDefaultBaudrate (uint32_t defaultBaudrate)
 Set default baudrate. More...
 

Detailed Description

API of Nextion.

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

Definition in file NexTouch.cpp.

Function Documentation

bool disableTouchFocus ( void  )

Disable all touch hot.

Return values
true- success.
false- failed.

Definition at line 513 of file NexTouch.cpp.

bool nexInit ( void  )

Init Nextion's baudrate,page id.

Return values
true- success.
false- failed.
Examples:
CompButton.ino, CompHotspot.ino, CompPage.ino, CompPicture.ino, CompPointer.ino, CompProgressBar.ino, CompSlice.ino, and CompText.ino.

Definition at line 409 of file NexTouch.cpp.

bool nexLoop ( NexTouch **  nexListenList)

Call mainEventLoop,watting for Nextion's touch event.

Parameters
nexListenList- index to Nextion Components list.
Return values
false- failed.
Examples:
CompButton.ino, CompHotspot.ino, CompPage.ino, CompPicture.ino, CompPointer.ino, CompProgressBar.ino, CompSlice.ino, and CompText.ino.

Definition at line 425 of file NexTouch.cpp.

bool pauseSerialCommand ( void  )

Pause serial instruction execution.

Return values
true- success.
false- failed.

Definition at line 537 of file NexTouch.cpp.

bool recoverySerialCommand ( void  )

Recovery serial instruction execution.

Return values
true- success.
false- failed.

Definition at line 562 of file NexTouch.cpp.

bool sendCurrentPageId ( uint8_t *  pageId)

Return current page id.

Parameters
pageId- output parameter,to save page id.
Return values
true- success.
false- failed.

Definition at line 439 of file NexTouch.cpp.

bool setCurrentBaudrate ( uint32_t  baudrate)

Set current baudrate.

Parameters
baudrate- current baudrate,it surrpots 2400,4800,9600,19200,38400,57600,38400.
Return values
true- success.
false- failed.

Definition at line 694 of file NexTouch.cpp.

bool setCurrentBrightness ( uint8_t  dimValue)

Set current backlight brightness value.

Parameters
dimValue- current backlight brightness value.
Return values
true- success.
false- failed.

Definition at line 588 of file NexTouch.cpp.

bool setDefaultBaudrate ( uint32_t  defaultBaudrate)

Set default baudrate.

Parameters
defaultBaudrate- default baudrate,it surrpots 2400,4800,9600,19200,38400,57600,38400.
Return values
true- success.
false- failed.

Definition at line 726 of file NexTouch.cpp.

bool setDefaultBrightness ( uint8_t  dimDefaultValue)

Set default backlight brightness value.

Parameters
dimDefaultValue- default backlight brightness value.
Return values
true- success.
false- failed.

Definition at line 623 of file NexTouch.cpp.

bool sleepMode ( uint8_t  mode)

Set device in sleep mode.

Parameters
mode- 1:into sleep mode,0:exit sleep mode.
Return values
true- success.
false- failed.

Definition at line 657 of file NexTouch.cpp.

bool touchCalibration ( void  )

Touch screen calibration.

Return values
true- success.
false- failed.

Definition at line 489 of file NexTouch.cpp.