MCP23017 inputs

STATUSLED
Compilation for all platforms
WIFI_ENABLE option to allow wired connection for ESP
Modbus, Syslog for ESP
This commit is contained in:
2020-07-12 21:56:05 +03:00
parent 3c38e151e1
commit 832b469103
34 changed files with 27945 additions and 26281 deletions

View File

@@ -1,28 +1,32 @@
#include <Print.h>
#include <UARTClass.h>
#include <Syslog.h>
#include <HardwareSerial.h>
#include <inttypes.h>
#define LOG_DEBUG 7
#define LOG_INFO 6
#define LOG_ERROR 3
#ifndef LOGBUFFER_SIZE
#define LOGBUFFER_SIZE 80
#endif
static uint8_t serialDebugLevel = 7;
static uint8_t udpDebugLevel =7;
#ifdef SYSLOG_ENABLE
#include <Syslog.h>
static char logBuffer[LOGBUFFER_SIZE];
static int logBufferPos=0;
#endif
#define LOG_DEBUG 7
#define LOG_INFO 6
#define LOG_ERROR 3
static uint8_t serialDebugLevel = 7;
static uint8_t udpDebugLevel =7;
class Streamlog : public Print
{
public:
Streamlog (UARTClass * _serialPort, int _severity = LOG_DEBUG, Syslog * _syslog = NULL);
#ifdef SYSLOG_ENABLE
Streamlog (HardwareSerial * _serialPort, int _severity = LOG_DEBUG, Syslog * _syslog = NULL);
#else
Streamlog (HardwareSerial * _serialPort, int _severity = LOG_DEBUG);
#endif
// {serialPort=_serialPort;severity=_severity; syslog=_syslog; }
void begin(unsigned long speed);
void end() ;
@@ -36,6 +40,8 @@ class Streamlog : public Print
operator bool() {return true;};
private:
uint16_t severity;
UARTClass *serialPort;
HardwareSerial *serialPort;
#ifdef SYSLOG_ENABLE
Syslog * syslog;
#endif
};