Treehopper C++ API
Ak8975.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <I2c.h>
5 #include "Magnetometer.h"
6 #include "Ak8975Registers.h"
7 
8 namespace Treehopper {
9  namespace Libraries {
10  namespace Sensors {
11  namespace Magnetic {
12  class LIBRARIES_API Ak8975 : public virtual Magnetometer {
13  public:
14  Ak8975(I2c &i2c, int rate = 100);
15 
16  void update();
17 
18  private:
19  SMBusDevice dev;
20  Ak8975Registers registers;
21  };
22  }
23  }
24  }
25 }
Base I2c interface.
Definition: I2c.h:10
Definition: SMBusDevice.h:7
#define LIBRARIES_API
Definition: Treehopper.Libraries.h:17
Definition: AdcPin.h:3