Stairs/src/mode.h

29 lines
566 B
C
Raw Normal View History

#ifndef __Mode
#define __Mode
#include <stdint.h>
#include <Stream.h>
class IStairs
{
public:
static const uint16_t Off = 0;
static const uint16_t On = 4095;
virtual uint8_t getCount() = 0;
virtual void set(uint8_t step, uint16_t value) = 0;
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