29 #define BBB_I2C_0 "/dev/i2c-0"
30 #define BBB_I2C_1 "/dev/i2c-1"
43 virtual int write(
unsigned char value);
44 virtual unsigned char readRegister(
unsigned int registerAddress);
45 virtual unsigned char*
readRegisters(
unsigned int number,
unsigned int fromAddress=0);
46 virtual int writeRegister(
unsigned int registerAddress,
unsigned char value);
virtual ~I2CDevice()
Definition: I2CDevice.cpp:168
virtual void debugDumpRegisters(unsigned int number=0xff)
Definition: I2CDevice.cpp:147
virtual void close()
Definition: I2CDevice.cpp:160
virtual unsigned char * readRegisters(unsigned int number, unsigned int fromAddress=0)
Definition: I2CDevice.cpp:129
virtual int write(unsigned char value)
Definition: I2CDevice.cpp:96
unsigned int bus
Definition: BusDevice.h:39
Generic I2C Device class that can be used to connect to any type of I2C device and read or write to i...
Definition: I2CDevice.h:38
virtual unsigned char readRegister(unsigned int registerAddress)
Definition: I2CDevice.cpp:111
I2CDevice(unsigned int bus, unsigned int device)
Definition: I2CDevice.cpp:47
Definition: BusDevice.cpp:27
This class is the parent of I2C and SPI devices, so that devices that use both SPI and I2C interfaces...
Definition: BusDevice.h:37
virtual int open()
Definition: I2CDevice.cpp:56
unsigned int device
Definition: BusDevice.h:40
virtual int writeRegister(unsigned int registerAddress, unsigned char value)
Definition: I2CDevice.cpp:79