GY-63_MS5611/libraries/FastShiftIn/FastShiftIn.h
rob tillaart 53ea9611db + version 0.1.01
+ stricter interface
+ better performance compare in example code
2015-03-06 15:09:11 +01:00

43 lines
683 B
C++

//
// FILE: FastShiftIn.h
// AUTHOR: Rob Tillaart
// VERSION: 0.1.01
// PURPOSE: shiftin
// DATE: 2013-09-29
// URL:
//
// Released to the public domain
//
#ifndef FastShiftIn_h
#define FastShiftIn_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#define FASTSHIFTIN_LIB_VERSION "0.1.01"
#define FASTSHIFTIN_NOVALUE -1
class FastShiftIn
{
public:
FastShiftIn(const uint8_t, const uint8_t, const uint8_t);
int read(void);
private:
uint8_t _bitorder;
int _value;
uint8_t _databit;
volatile uint8_t *_datain;
uint8_t _clockbit;
volatile uint8_t *_clockin;
};
#endif
// -- END OF FILE --