mirror of
https://github.com/brendanhaines/RasPi.git
synced 2024-11-09 16:44:40 -07:00
24 lines
426 B
C++
24 lines
426 B
C++
#ifndef DSM2_H
|
|
#define DSM2_H
|
|
|
|
#define chanBeforeFl -1
|
|
|
|
class DSM2 {
|
|
public:
|
|
DSM2( char* device = "/dev/ttyAMA0", int mode = 1024 );
|
|
|
|
bool ready();
|
|
void update( bool block = false );
|
|
void readNext();
|
|
|
|
int* values;
|
|
int frameLoss;
|
|
private:
|
|
int lastReadChan;
|
|
|
|
int fd; // file descriptor for serial bus
|
|
int valueSize; // number of bits for value part of frame
|
|
int valueMask;
|
|
};
|
|
|
|
#endif |