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
// driver_SFM3000.h

#ifndef _DRIVER_SFM3000_h
#define _DRIVER_SFM3000_h

#if defined(ARDUINO) && ARDUINO >= 100
	#include "arduino.h"
#else
	#include "WProgram.h"
#endif

#include "DriverContext.h"

class SensorSFM3000
{
public :
	bool Init(t_i2cdevices device, void* hw_handle);
	bool doMeasure(float* Flow, float* T);
	float GetIntegral();
	void ResetIntegral();

private:
	t_i2cdevices i2c_device;
	uint8_t crc8(const uint8_t data, uint8_t crc);<--- Unused private function: 'SensorSFM3000::crc8'
	bool MeasureFluxRaw(uint32_t* raw);

	HW* hwi;
	DebugIfaceClass* dbg;

	float Integral;
	bool _initialized = false;
};

#endif