-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathftdidioportinterface.h
46 lines (33 loc) · 1.04 KB
/
ftdidioportinterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef FTDIDIOPORTINTERFACE_H
#define FTDIDIOPORTINTERFACE_H
#include <QString>
#include <QStringList>
#include "directiointerface.h"
#include "ftdiinterfaceprovider.h"
class FtdiDioPortInterface : public DirectIOInterface
{
QString reasonText;
QList<QString> portSerials;
QList<FT_HANDLE> ports;
QList<unsigned char> bitmodes;
FtdiInterfaceProvider * prov;
public:
FtdiDioPortInterface(FtdiInterfaceProvider * provider);
bool isAvable();
int getPortCount();
void setPortValue(int no,unsigned char value);
unsigned char getPortValue(int no);
void setPinMode(int no,int pin,IO_MODE mode);
void setPortMode(int no,IO_MODE mode);
bool open();
void close();
bool load();
void unload();
void setPortName(QString n);
QString getPortName();
QStringList getPortList();
virtual QString name() {return "DIOFTDI";}
virtual QString description() {return QObject::tr("DirectIO to FTDI");}
virtual QString reason() {return reasonText;}
};
#endif // FTDIDIOPORTINTERFACE_H