26 lines
473 B
C
26 lines
473 B
C
![]() |
#ifndef INTERFACE_H
|
||
|
#define INTERFACE_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include "base/base.h"
|
||
|
|
||
|
using namespace std;
|
||
|
using namespace std::placeholders;
|
||
|
|
||
|
typedef std::function<void(void)> irq_cb;
|
||
|
|
||
|
class InterFace : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
InterFace() {}
|
||
|
virtual ~InterFace() {}
|
||
|
virtual void init() = 0;
|
||
|
virtual int write(myarray data) = 0;
|
||
|
virtual void set_irq(irq_cb fun, myarray &data) = 0;
|
||
|
};
|
||
|
|
||
|
InterFace *interFaceFind(const char *name);
|
||
|
|
||
|
#endif // INTERFACE_H
|