Stairs/module/src/global.cpp

32 lines
530 B
C++

/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#include "global.h"
#include "config.h"
int serialRead()
{
return Serial.read();
}
int serialAvailable()
{
return Serial.available();
}
size_t serialWrite(const byte what)
{
return Serial.write(what);
}
Settings settings;
Display display;
RS485 comm(serialRead, serialAvailable, serialWrite, 20);
Adafruit_PWMServoDriver pwmDriver(PWMDriverAddress);
State state = State::WaitingForComm;
uint32_t currentTime;