4#include "pflib/WishboneTarget.h"
48 void write_byte(uint8_t i2c_dev_addr, uint8_t data);
Class which encapsulates the I2C controller in the Polarfire.
Definition: I2C.h:13
int get_active_bus()
Get the currently active bus.
Definition: I2C.cxx:43
uint8_t read_byte(uint8_t i2c_dev_addr)
Read a single byte using the efficient interface.
Definition: I2C.cxx:128
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.
Definition: I2C.cxx:146
int get_bus_speed()
Get the speed for the bus in kbps.
Definition: I2C.cxx:60
void set_active_bus(int ibus)
Pick the active bus Set the value -1 to determ.
Definition: I2C.cxx:31
bool i2c_wait(bool nack_ok=false)
utility for software-mode I2C
Definition: I2C.cxx:105
void backplane_hack(bool enable)
Turn on/off the horrible hack for the V1 backplane.
Definition: I2C.cxx:67
int get_bus_count()
Get the number of available busses.
Definition: I2C.cxx:47
int usec_per_byte_
microseconds per byte
Definition: I2C.h:72
void write_byte(uint8_t i2c_dev_addr, uint8_t data)
Write a single byte using the efficient interface, and wait for completion.
Definition: I2C.cxx:72
void set_bus_speed(int speed=100)
Set the speed for the bus in kbps.
Definition: I2C.cxx:51
Abstract interface for wishbone transactions, used by ~all classes in pflib.
Definition: WishboneInterface.h:15
Parent class for standard wishbone targets providing some utilities.
Definition: WishboneTarget.h:29
WishboneTarget(WishboneInterface *wb, int target)
simply store pointer to interface and target we will interact with
Definition: WishboneTarget.h:34
Polarfire Interaction Library.
Definition: Backend.h:8