diff options
Diffstat (limited to 'schulung_tools/leds/leds.h')
| -rw-r--r-- | schulung_tools/leds/leds.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/schulung_tools/leds/leds.h b/schulung_tools/leds/leds.h new file mode 100644 index 0000000..b4fb933 --- /dev/null +++ b/schulung_tools/leds/leds.h @@ -0,0 +1,38 @@ +#ifndef LEDS_H +#define LEDS_H + +#include <QMainWindow> +#include <QTimer> +#include <QRadioButton> + +#include <stdint.h> + +namespace Ui { +class Leds; +} + +struct ivmshmem { + uint8_t leds[3]; +} __attribute__((packed)); + +class Leds : public QMainWindow +{ + Q_OBJECT + +public: + explicit Leds(QWidget *parent = 0); + ~Leds(); + + int init(void); + +private: + Ui::Leds *ui; + QRadioButton *radioButton[3]; + QTimer timer; + struct ivmshmem *shm; + +public slots: + void poll_shm(void); +}; + +#endif // LEDS_H |
