-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathI2CDevice.h
42 lines (39 loc) · 987 Bytes
/
I2CDevice.h
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
36
37
38
39
40
41
42
/*
* I2CDevice.h
*
* Robovero class header to communicate with an I2C device attached to the Gumstix Robovero expansion board.
*
* This class is basically a conversion of the python code written by Neil
* MacMunn ([email protected]) at Gumstix.
* https://github.com/robovero
*
*
* Andrew C. Smith
* Aerospace Robotics Lab
* Stanford University
*
* v1.2 June 26 2013
*
*/
#ifndef Robovero_H
#include "Robovero.h"
#endif
class I2CDevice
{
void* config;
void* tx_data;
void* rx_data;
void* rx_data6;
Robovero *robo_host;
public:
unsigned char read();
unsigned char readReg(void* reg);
void read6(unsigned char* values);
void read6Reg(void* reg, unsigned short* values);
void read6Reg(void* reg, unsigned char* values);
void writeReg(unsigned char reg, unsigned char value);
void writeReg(unsigned char value);
I2CDevice(Robovero *host, unsigned int address);
~I2CDevice();
};