-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgpio.h
More file actions
104 lines (87 loc) · 2.27 KB
/
gpio.h
File metadata and controls
104 lines (87 loc) · 2.27 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#ifndef GPIO_H
#define GPIO_H
#include <QWidget>
#include <QLabel>
#include <QBoxLayout>
#include <QGroupBox>
#include <QRadioButton>
#include <QPushButton>
#include <QTimer>
class gpio: public QWidget
{
Q_OBJECT
public:
gpio(QWidget *parent = 0);
public slots:
void gpio00clicked(bool checked);
void gpio01clicked(bool checked);
void gpio02clicked(bool checked);
void gpio03clicked(bool checked);
void gpio04clicked(bool checked);
void gpio05clicked(bool checked);
void gpio06clicked(bool checked);
void gpio07clicked(bool checked);
void gpioBank00clicked(bool checked);
void button00Clicked();
void button01Clicked();
void button02Clicked();
void button03Clicked();
void button04Clicked();
void button05Clicked();
void button06Clicked();
void button07Clicked();
void getActionClicked();
void setActionClicked();
void inOutClicked();
void highLowClicked();
void timeoutTimer();
void demoClicked();
private:
unsigned int gpioID;
unsigned int keepGpioID;
bool gpiodetect;
uint32_t mask;
uint32_t direction;
uint32_t level;
bool levelFlag;
bool directionFlag;
int width;
int height;
QLabel *pinCounts;
QRadioButton *gpioList[8];
QRadioButton *gpioBank00;
QPushButton *pinButtonList[8];
QVBoxLayout *deviceLayout;
QVBoxLayout *valueLayout;
QVBoxLayout *directionLayout;
QVBoxLayout *actionLayout;
QVBoxLayout *statusLayout;
QVBoxLayout *gpioListALayout;
QVBoxLayout *gpioListBLayout;
QHBoxLayout *bankButtonLayout;
QHBoxLayout *directionValueLayout;
QHBoxLayout *getSetLayout;
QHBoxLayout *pinDirectionLayout;
QHBoxLayout *pinLevelLayout;
QHBoxLayout *pinNumberLayout;
QHBoxLayout *gpioListLayout;
QGroupBox *deviceGroup;
QGroupBox *actionGroup;
QGroupBox *statusGroup;
QLabel *directionLabel;
QPushButton *inOutButton;
QLabel *valueLabel;
QPushButton *highLowButton;
QPushButton *getAction;
QPushButton *setAction;
QLabel *pinNumberList[8];
QLabel *pinDirectionList[8];
QLabel *pinLevelList[8];
QLabel *errorLabel;
QGridLayout *grid;
QTimer *timer;
int counter;
QPushButton *demo;
bool demoState;
};
#endif // GPIO_H