|
|
| I2C_Linux (const std::string &devfile) |
| |
| virtual void | set_bus_speed (int speed=100) |
| | Set the speed for the bus in kbps.
|
| |
| virtual int | get_bus_speed () |
| | Get the speed for the bus in kbps.
|
| |
| void | write_byte (uint8_t i2c_dev_addr, uint8_t data) |
| | Write a single byte using the efficient interface, and wait for completion.
|
| |
| uint8_t | read_byte (uint8_t i2c_dev_addr) |
| | Read a single byte using the efficient interface.
|
| |
| std::vector< uint8_t > | general_write_read (uint8_t i2c_dev_addr, const std::vector< uint8_t > &wdata, int nread=0) |
| | Carry out a write of zero or more bytes followed a by a read of zero or more bytes.
|
| |
|
|
void | obtain_control (uint8_t i2c_dev_addr) |
| |
◆ general_write_read()
| std::vector< uint8_t > pflib::I2C_Linux::general_write_read |
( |
uint8_t | i2c_dev_addr, |
|
|
const std::vector< uint8_t > & | wdata, |
|
|
int | nread = 0 ) |
|
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.
- Exceptions
-
Implements pflib::I2C.
◆ get_bus_speed()
| int pflib::I2C_Linux::get_bus_speed |
( |
| ) |
|
|
virtual |
Get the speed for the bus in kbps.
Implements pflib::I2C.
◆ read_byte()
| uint8_t pflib::I2C_Linux::read_byte |
( |
uint8_t | i2c_dev_addr | ) |
|
|
virtual |
Read a single byte using the efficient interface.
- Exceptions
-
Implements pflib::I2C.
◆ set_bus_speed()
| void pflib::I2C_Linux::set_bus_speed |
( |
int | speed = 100 | ) |
|
|
virtual |
Set the speed for the bus in kbps.
Implements pflib::I2C.
◆ write_byte()
| void pflib::I2C_Linux::write_byte |
( |
uint8_t | i2c_dev_addr, |
|
|
uint8_t | data ) |
|
virtual |
Write a single byte using the efficient interface, and wait for completion.
- Exceptions
-
Implements pflib::I2C.
The documentation for this class was generated from the following files: