Treehopper C++ API
I2c.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Treehopper.h"
4 #include <stdint.h>
5 #include <cstddef>
6 #include <vector>
7 
8 namespace Treehopper {
11  public:
12  virtual ~I2c() {}
13 
15  virtual void speed(double value) = 0;
16 
18  virtual double speed() = 0;
19 
21  virtual void enabled(bool value) = 0;
22 
24  virtual bool enabled() = 0;
25 
32  virtual std::vector<uint8_t> sendReceive(uint8_t address, std::vector<uint8_t> data,
33  size_t numBytesToRead = 0) = 0;
34  };
35 }
Base I2c interface.
Definition: I2c.h:10
virtual ~I2c()
Definition: I2c.h:12
Definition: AdcPin.h:3
#define TREEHOPPER_API
Definition: Treehopper.h:17