YAHAL
Yet Another Hardware Abstraction Library
Loading...
Searching...
No Matches
i2c_BBB.h
1#ifndef _I2C_BBB_H_
2#define _I2C_BBB_H_
3
4#include "i2c_interface.h"
5
6class i2c_BBB : public i2c_interface {
7 public:
8
9 i2c_BBB(const char * dev);
10 ~i2c_BBB();
11
12 int16_t i2cRead (uint16_t addr,
13 uint8_t *rxbuf, uint16_t len,
14 bool sendStop = true);
15
16 int16_t i2cWrite(uint16_t addr,
17 uint8_t *txbuf, uint16_t len,
18 bool sendStop = true);
19
20 void setSpeed(uint32_t Hz);
21
22 private:
23 int _fd;
24};
25
26#endif