2017-03-23 18:45:29 +00:00
|
|
|
#ifndef __Mode
|
|
|
|
#define __Mode
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <Stream.h>
|
|
|
|
|
|
|
|
|
|
|
|
class IStairs
|
|
|
|
{
|
|
|
|
public:
|
2017-03-24 22:04:58 +00:00
|
|
|
static const uint16_t Off = 0;
|
|
|
|
static const uint16_t On = 4095;
|
|
|
|
|
2017-03-24 20:40:56 +00:00
|
|
|
virtual uint8_t getCount() = 0;
|
|
|
|
virtual void set(uint8_t step, uint16_t value) = 0;
|
2017-03-23 18:45:29 +00:00
|
|
|
virtual void setAll(uint16_t value) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
class IMode
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void read(uint8_t* data) = 0;
|
|
|
|
virtual void write(Stream* stream) = 0;
|
|
|
|
|
|
|
|
virtual void init(IStairs* stairs, uint32_t currentTime) = 0;
|
|
|
|
virtual void tick(IStairs* stairs, uint32_t currentTime) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|