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

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

#include <I2CMasterNode.hpp>

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

Public Member Functions

Protected Member Functions

Protected Attributes

Private Member Functions

Private Attributes

Static Private Attributes

Friends

Detailed Description

OpenCode I2C interface to a ipbus node.

Author
Kristian Harder, Alessandro Thea
Date
August 2013

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

Constructor & Destructor Documentation

◆ I2CBaseNode()

I2CBaseNode ( const uhal::Node&  aNode)

◆ ~I2CBaseNode()

~I2CBaseNode ( )
virtual

Member Function Documentation

◆ constructor()

void constructor ( )
private

◆ getI2CClockPrescale()

virtual uint8_t getI2CClockPrescale ( ) const
inlinevirtual

◆ getSlaveAddress()

uint8_t getSlaveAddress ( const std::string&  name) const
virtual

◆ getSlaves()

std::vector<std::string> getSlaves ( ) const
virtual

◆ readBlockI2C()

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

◆ readI2C()

uint8_t readI2C ( uint8_t  aSlaveAddress,
uint32_t  i2cAddress 
) const
virtual

commodity functions

◆ reset()

void reset ( ) const
private

◆ UHAL_DERIVEDNODE()

UHAL_DERIVEDNODE ( I2CBaseNode  )
private

◆ waitUntilFinished()

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

◆ writeBlockI2C()

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

◆ writeI2C()

void writeI2C ( uint8_t  aSlaveAddress,
uint32_t  i2cAddress,
uint32_t  data 
) const
virtual

Friends And Related Function Documentation

◆ I2CSlave

friend class I2CSlave
friend

Member Data Documentation

◆ mClockPrescale

uint16_t mClockPrescale
private

clock prescale factor

◆ mCmd

const std::string mCmd = "cmd_stat"
staticprivate

◆ mCtrl

const std::string mCtrl = "ctrl"
staticprivate

◆ mPreHi

const std::string mPreHi = "ps_hi"
staticprivate

IPBus register names for i2c bus.

◆ mPreLo

const std::string mPreLo = "ps_lo"
staticprivate

◆ mRx

const std::string mRx = "data"
staticprivate

◆ mSlavesAddresses

boost::unordered_map<std::string,uint8_t> mSlavesAddresses
protected

Slaves.

◆ 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: