some arduino refactoring

Former-commit-id: f5b74a8a1f10400579ef2267f39a7a03f551ad27
This commit is contained in:
Ziver Koc 2016-02-04 17:19:21 +01:00
parent bbb9996d56
commit 588507621a
4 changed files with 46 additions and 10 deletions

View file

@ -1,5 +1,5 @@
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#ifndef HALCONFIGURATION_H
#define HALCONFIGURATION_H
#include "Definitions.h"
@ -23,4 +23,4 @@
#define LIGHT_POL_MULTIPLE 1 // poling in seconds
#endif //CONFIGURATION_H
#endif // HALCONFIGURATION_H

View file

@ -1,5 +1,5 @@
#ifndef DEFINITIONS_H
#define DEFINITIONS_H
#ifndef HALDEFINITIONS_H
#define HALDEFINITIONS_H
//////// PROTOCOLS
#define PROT_NEXA_SELFLEARNING
@ -11,4 +11,4 @@
#define HW_PHOTOCELL
#endif // DEFINITIONS_H
#endif // HALDEFINITIONS_H

View file

@ -0,0 +1,40 @@
#ifndef HALINTERFACES_H
#define HALINTERFACES_H
class HardwarePowerConsumption
{
public:
virtual void setup() = 0;
virtual int getConsumption() = 0;
}
class HardwareTemperature
{
public:
virtual void setup() = 0;
virtual int getTemperature() = 0;
virtual int getHumidity() = 0;
}
class HardwareLight
{
public:
virtual void setup() = 0;
virtual int getLuminosity() = 0;
}
class HardwareInterrupt
{
public:
virtual void interrupt(bool enable) = 0;
}
class Protocol
{
public:
virtual void setup() = 0;
virtual void send() = 0;
}
#endif // HALINTERFACES_H

View file

@ -1,4 +0,0 @@
#ifndef PROTOCL_H
#define PROTOCL_H
#endif // PROTOCL_H