pflib v3.0.0-rc1-29-g3a901ac
Pretty Fine HGCROC Interaction Library
|
Base class which encapsulates the I2C interface, represents a single bus. More...
#include <I2C.h>
Public Member Functions | |
virtual void | set_bus_speed (int speed=100)=0 |
Set the speed for the bus in kbps. | |
virtual int | get_bus_speed ()=0 |
Get the speed for the bus in kbps. | |
virtual void | write_byte (uint8_t i2c_dev_addr, uint8_t data)=0 |
Write a single byte using the efficient interface, and wait for completion. | |
virtual uint8_t | read_byte (uint8_t i2c_dev_addr)=0 |
Read a single byte using the efficient interface. | |
virtual std::vector< uint8_t > | general_write_read (uint8_t i2c_dev_addr, const std::vector< uint8_t > &wdata, int nread=0)=0 |
Carry out a write of zero or more bytes followed a by a read of zero or more bytes. | |
Base class which encapsulates the I2C interface, represents a single bus.
|
pure virtual |
Carry out a write of zero or more bytes followed a by a read of zero or more bytes.
If either write or read is zero bytes long, it is omitted.
pflib::Exception | in the case of I2C communication failure |
Implemented in pflib::I2C_Linux.
|
pure virtual |
Get the speed for the bus in kbps.
Implemented in pflib::I2C_Linux.
|
pure virtual |
Read a single byte using the efficient interface.
pflib::Exception | in the case of I2C communication failure |
Implemented in pflib::I2C_Linux.
|
pure virtual |
Set the speed for the bus in kbps.
Implemented in pflib::I2C_Linux.
|
pure virtual |
Write a single byte using the efficient interface, and wait for completion.
pflib::Exception | in the case of I2C communication failure |
Implemented in pflib::I2C_Linux.