My Project  v0.0.16
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
OpenCoresI2C Class Reference

Class to provide OpenCode I2C interface to a ipbus node. More...

#include <OpenCoresI2C.hpp>

Inheritance diagram for OpenCoresI2C:
Inheritance graph
[legend]
Collaboration diagram for OpenCoresI2C:
Collaboration graph
[legend]

Public Member Functions

Private Member Functions

Private Attributes

Static Private Attributes

Detailed Description

Class to provide OpenCode I2C interface to a ipbus node.

The class is non-copyable on purpose as the inheriting object must properly set the node pointer in the copy i2c access through an IPbus interface

Author
Kristian Harder, Alessandro Thea
Date
August 2013

Constructor & Destructor Documentation

◆ OpenCoresI2C() [1/2]

OpenCoresI2C ( const uhal::Node&  aNode)

◆ OpenCoresI2C() [2/2]

OpenCoresI2C ( const uhal::Node&  aNode,
uint8_t  aSlaveAddress 
)

◆ ~OpenCoresI2C()

~OpenCoresI2C ( )
virtual

Member Function Documentation

◆ getI2CClockPrescale()

uint8_t getI2CClockPrescale ( ) const
inline

◆ getI2CSlaveAddress()

uint8_t getI2CSlaveAddress ( ) const
inline

◆ readBlockI2C()

std::vector<uint8_t> readBlockI2C ( const uint32_t  numBytes) const

◆ readI2C()

uint8_t readI2C ( uint32_t  i2cAddress) const

◆ reset()

void reset ( ) const
private

◆ UHAL_DERIVEDNODE()

UHAL_DERIVEDNODE (   OpenCoresI2C)
private

◆ waitUntilFinished()

void waitUntilFinished ( bool  requireAcknowledgement = true,
bool  requireBusIdleAtEnd = false 
) const
private

◆ writeBlockI2C()

void writeBlockI2C ( const std::vector<uint8_t>&  data) const

◆ writeI2C()

void writeI2C ( uint32_t  i2cAddress,
uint32_t  data 
) const

Member Data Documentation

◆ mClockPrescale

uint16_t mClockPrescale
private

◆ mCmd

const std::string mCmd = "cmd_stat"
staticprivate

◆ mCtrl

const std::string mCtrl = "ctrl"
staticprivate

◆ mPreHi

const std::string mPreHi = "ps_hi"
staticprivate

◆ mPreLo

const std::string mPreLo = "ps_lo"
staticprivate

◆ mRx

const std::string mRx = "data"
staticprivate

◆ mSlaveAddress

uint8_t mSlaveAddress
private

◆ mStatus

const std::string mStatus = "cmd_stat"
staticprivate

◆ mTx

const std::string mTx = "data"
staticprivate

The documentation for this class was generated from the following files: