xref: /OK3568_Linux_fs/app/forlinx/flapp/src/plugins/allwinner/adc/adcinterface.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 #ifndef ADCINTERFACE_H
2 #define ADCINTERFACE_H
3 
4 #include <QObject>
5 class QFile;
6 class QSocketNotifier;
7 class ADCInterface : public QObject
8 {
9     Q_OBJECT
10 public:
11     explicit ADCInterface(const QString &devName, QObject *parent = nullptr);
12     ~ADCInterface();
13     bool open();
14     void close();
15     int adcIndex();
16 
17 Q_SIGNALS:
18     void readRead(int v);
19 
20 private:
21     void open(bool bOpen);
22 
23 private:
24     QString m_devName;
25     QFile *m_file;
26     QSocketNotifier *m_notfier;
27     int m_index;
28 };
29 
30 #endif // ADCINTERFACE_H
31