添加一些基本类
This commit is contained in:
25
interface/interface.h
Normal file
25
interface/interface.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#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
|
Reference in New Issue
Block a user