Clean up abstract interface
move defenitions out of hardwareRevX.hpp into cpp
This commit is contained in:
parent
9a94947c97
commit
a2e29734e4
3 changed files with 21 additions and 21 deletions
|
@ -4,19 +4,10 @@
|
|||
|
||||
class HardwareAbstractionInterface {
|
||||
public:
|
||||
typedef void (*display_flush_cb)(struct _lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p);
|
||||
typedef void (*touch_pad_read)(struct _lv_indev_drv_t *indev_drv,
|
||||
lv_indev_data_t *data);
|
||||
|
||||
HardwareAbstractionInterface() = default;
|
||||
|
||||
virtual void debugPrint(std::string message) = 0;
|
||||
|
||||
virtual void sendIR() = 0;
|
||||
|
||||
virtual void MQTTPublish(const char *topic, const char *payload) = 0;
|
||||
|
||||
virtual void init() = 0;
|
||||
|
||||
virtual void sendIR() = 0;
|
||||
virtual void MQTTPublish(const char *topic, const char *payload) = 0;
|
||||
virtual void debugPrint(std::string message) = 0;
|
||||
};
|
||||
|
|
|
@ -81,6 +81,18 @@ void HardwareRevX::init() {
|
|||
debugPrint(std::string("Finished Hardware Setup in %d",millis()));
|
||||
}
|
||||
|
||||
void HardwareRevX::debugPrint(std::string aDebugMessage){
|
||||
Serial.print(aDebugMessage.c_str());
|
||||
}
|
||||
|
||||
void HardwareRevX::sendIR(){
|
||||
|
||||
}
|
||||
|
||||
void HardwareRevX::MQTTPublish(const char *topic, const char *payload){
|
||||
|
||||
}
|
||||
|
||||
void HardwareRevX::initLVGL() {
|
||||
lv_init();
|
||||
|
||||
|
|
|
@ -34,14 +34,11 @@ public:
|
|||
}
|
||||
|
||||
HardwareRevX() : HardwareAbstractionInterface(){};
|
||||
|
||||
virtual void debugPrint(std::string aDebugMessage) override {Serial.print(aDebugMessage.c_str());}
|
||||
|
||||
virtual void sendIR() override {}
|
||||
|
||||
virtual void MQTTPublish(const char *topic, const char *payload) override {}
|
||||
|
||||
virtual void init();
|
||||
// HardwareAbstractionInterface
|
||||
virtual void init() override;
|
||||
virtual void debugPrint(std::string aDebugMessage) override;
|
||||
virtual void sendIR() override;
|
||||
virtual void MQTTPublish(const char *topic, const char *payload) override;
|
||||
|
||||
void loopHandler();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue