|
pflib v3.9.0-rc3-11-g2537d8f
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. | |
Protected Attributes | |
| logging::logger | the_log_ {logging::get("I2C")} |
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, pflib::lpgbt::I2C, and pflib::lpgbt::I2CwithMux.
|
pure virtual |
Get the speed for the bus in kbps.
Implemented in pflib::I2C_Linux, and pflib::lpgbt::I2C.
|
pure virtual |
Read a single byte using the efficient interface.
| pflib::Exception | in the case of I2C communication failure |
Implemented in pflib::I2C_Linux, pflib::lpgbt::I2C, and pflib::lpgbt::I2CwithMux.
|
pure virtual |
Set the speed for the bus in kbps.
Implemented in pflib::I2C_Linux, and pflib::lpgbt::I2C.
|
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, pflib::lpgbt::I2C, and pflib::lpgbt::I2CwithMux.