Raspberry PI GPIO Scol plugin
rpishiftdriver.h
1
2#ifndef RPISHIFTDRIVER_H
3#define RPISHIFTDRIVER_H
4
5#include <boost/thread.hpp>
6#include <vector>
7#include <utility>
8
10{
11public:
12 typedef std::pair<int, int> shiftValue;
14
15 RpiShiftDriver(int data, int clock, int latch, int nbOut);
16
18
19 void threadLoop();
20
21 void SetValues(std::vector<shiftValue> values);
22
23 void WriteValue(int value);
24private:
25 int mNbOut;
26 int mData;
27 int mClock;
28 int mLatch;
29 std::vector<shiftValue> mValues;
30 int mCurPos;
31 bool mState;
32 boost::thread mThread;
33};
34
35#endif //RPISHIFTDRIVER_H