34#ifndef _FREERTOS_DRIVERS_COMMON_I2C_HXX_
35#define _FREERTOS_DRIVERS_COMMON_I2C_HXX_
73 virtual int transfer(
struct i2c_msg *msg,
bool stop) = 0;
112 int smbus(
File *file,
unsigned long data);
const char * name
device name
Private data for an I2C device.
ssize_t write(File *file, const void *buf, size_t count) OVERRIDE
Write to a file or device.
int smbus(File *file, unsigned long data)
Request an smbus (ioctl) transaction.
I2C(const char *name)
Constructor.
void flush_buffers() OVERRIDE
Discards all pending buffers.
I2C()
Default constructor.
ssize_t read(File *file, void *buf, size_t count) OVERRIDE
Read from a file or device.
int ioctl(File *file, unsigned long int key, unsigned long data) OVERRIDE
Request an ioctl transaction.
virtual int transfer(struct i2c_msg *msg, bool stop)=0
Method to transmit/receive the data.
int transfer_messages(struct i2c_msg *msgs, int num)
Conduct multiple message transfers with one stop at the end.
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.