Synchronous I2C implementation.
More...
#include <I2C.h>
|
|
| I2CwithMux (lpGBT &lpGBT, int ibus, uint8_t muxaddr, uint8_t tochoose) |
| |
| virtual void | write_byte (uint8_t i2c_dev_addr, uint8_t data) |
| | Write a single byte using the efficient interface, and wait for completion.
|
| |
| virtual uint8_t | read_byte (uint8_t i2c_dev_addr) |
| | 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) |
| | Carry out a write of zero or more bytes followed a by a read of zero or more bytes.
|
| |
|
| I2C (lpGBT &lpGBT, int ibus) |
| |
| 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.
|
| |
|
|
uint8_t | muxaddr_ |
| |
|
uint8_t | wval_ |
| |
Synchronous I2C implementation.
◆ general_write_read()
| std::vector< uint8_t > pflib::lpgbt::I2CwithMux::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
-
Reimplemented from pflib::lpgbt::I2C.
◆ read_byte()
| uint8_t pflib::lpgbt::I2CwithMux::read_byte |
( |
uint8_t | i2c_dev_addr | ) |
|
|
virtual |
Read a single byte using the efficient interface.
- Exceptions
-
Reimplemented from pflib::lpgbt::I2C.
◆ write_byte()
| void pflib::lpgbt::I2CwithMux::write_byte |
( |
uint8_t | i2c_dev_addr, |
|
|
uint8_t | data ) |
|
virtual |
Write a single byte using the efficient interface, and wait for completion.
- Exceptions
-
Reimplemented from pflib::lpgbt::I2C.
The documentation for this class was generated from the following files:
- include/pflib/lpgbt/I2C.h
- src/pflib/lpgbt/I2C.cxx