nextion
This commit is contained in:
parent
3409ed8fb7
commit
9d96b2b5b3
1438 changed files with 117700 additions and 18 deletions
55
lib/ITEADLIB_Arduino_Nextion-master/NexHardware.h
Normal file
55
lib/ITEADLIB_Arduino_Nextion-master/NexHardware.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* @file NexHardware.h
|
||||
*
|
||||
* The definition of base API for using Nextion.
|
||||
*
|
||||
* @author Wu Pengfei (email:<pengfei.wu@itead.cc>)
|
||||
* @date 2015/8/11
|
||||
* @copyright
|
||||
* Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*/
|
||||
#ifndef __NEXHARDWARE_H__
|
||||
#define __NEXHARDWARE_H__
|
||||
#include <Arduino.h>
|
||||
#include "NexConfig.h"
|
||||
#include "NexTouch.h"
|
||||
|
||||
/**
|
||||
* @addtogroup CoreAPI
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Init Nextion.
|
||||
*
|
||||
* @return true if success, false for failure.
|
||||
*/
|
||||
bool nexInit(void);
|
||||
|
||||
/**
|
||||
* Listen touch event and calling callbacks attached before.
|
||||
*
|
||||
* Supports push and pop at present.
|
||||
*
|
||||
* @param nex_listen_list - index to Nextion Components list.
|
||||
* @return none.
|
||||
*
|
||||
* @warning This function must be called repeatedly to response touch events
|
||||
* from Nextion touch panel. Actually, you should place it in your loop function.
|
||||
*/
|
||||
void nexLoop(NexTouch *nex_listen_list[]);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
bool recvRetNumber(uint32_t *number, uint32_t timeout = 100);
|
||||
uint16_t recvRetString(char *buffer, uint16_t len, uint32_t timeout = 100);
|
||||
void sendCommand(const char* cmd);
|
||||
bool recvRetCommandFinished(uint32_t timeout = 100);
|
||||
|
||||
#endif /* #ifndef __NEXHARDWARE_H__ */
|
Loading…
Add table
Add a link
Reference in a new issue