Public Member Functions | Static Public Member Functions | Protected Attributes | Related Functions

nxyter::NxI2c Class Reference

Represents the I2C interface of an nXYTER. More...

#include <NxI2c.h>

Inheritance diagram for nxyter::NxI2c:
Inheritance graph
[legend]
Collaboration diagram for nxyter::NxI2c:
Collaboration graph
[legend]

Public Member Functions

 NxI2c (base::Board *board, int port=0, uint8_t addr=0)
 Constructor with full addressing path information.
virtual ~NxI2c ()
int setContext (NxContext &cntx, int domask=nxyter::kDoAll, bool veri=true)
 Write the part or full context to nXYTER with optional readback verify.
int getContext (NxContext &cntx, int domask=nxyter::kDoAll)
 Read the part or full context from nXYTER.
int getCounters (uint16_t &overflow, uint16_t &tokenmiss)
 Read and clear the error counters from nXYTER.
int setTestModes (bool testpuls, bool testtrig, int calselect)
 Setup test pulser and test trigger mode.
int probe ()
 Probe whether an nXYTER exists.
int setToDefault (bool ispos=false, int maskon=128, int poweron=128)
 Write default values into nXYTER registers.
void printRegisters (std::ostream &os, int domask=nxyter::kDoAll)
 Read nXYTER registers and print to stream os.
int setRegMask (const uint8_t *val)
 Write the mask nXYTER register set.
int setRegCore (const uint8_t *val)
 Write the core nXYTER register set.
int setRegTrim (const uint8_t *val)
 Write 129 8 bit data values to the trim-daq register 42.
int getRegMask (uint8_t *val)
 Read the mask nXYTER register set.
int getRegCore (uint8_t *val)
 Read the core nXYTER register set.
int getRegTrim (uint8_t *val)
 Read 129 8 bit data values from the trim-daq register 42.
bool isSPI () const
void setPortNumber (int port)
 Set I2C bus port number on ROC.
int getPortNumber () const
 Returns I2C bus port number on ROC.
void setSlaveAddr (uint8_t addr)
 Set slave address of device on I2C bus.
uint8_t getSlaveAddr () const
 Return slave address of device on I2C bus.
int setRegister (uint8_t reg, uint8_t val, bool veri=false)
 Write to device register with optional readback verification.
int getRegister (uint8_t reg, uint8_t &val)
 Read 8 bit from device register.
int getRegister16 (uint8_t reg, uint16_t &val)
 Read 16 bit from device register.
int setRegisterVerify (uint8_t reg, uint8_t valset, uint8_t &valget)
 Write to device register and return the readback value.
int setRegisterArray (uint8_t reg, const uint8_t *val, int nreg, bool veri=false)
 Write to device register array with optional readback verification.
int getRegisterArray (uint8_t reg, uint8_t *val, int nreg)
 Read from device register array.
int setMailboxRegister (uint8_t reg, const uint8_t *val, int nval)
 Write to device mailbox register.
int getMailboxRegister (uint8_t reg, uint8_t *val, int nval)
 Read from device mailbox register.
base::Boardboard ()
 Return reference to roc::Board which hosts the Peripheral.
base::BoardgetBoard () const
 Returns pointer to the roc::Board which hosts the Peripheral.

Static Public Member Functions

static const char * registerName (int reg)
 Returns name for register reg (or "" if undefined).
static const char * configurationBitName (int bit)
 Returns descriptive string for configuration bit bit.
static uint8_t delayToSetting (uint8_t delay)
 Convert delay to a nXYTER delay buffer setting.
static uint8_t settingToDelay (uint8_t val)
 Convert nXYTER delay buffer setting into a delay.
static void addAddrMap (base::Board *board)
 Add the I2C interface address set to the address mapping tables.

Protected Attributes

int fUseSPI
 indicate that SPI->I2C interface for SysCore3 should be used
int fPort
 I2C bus port number.
uint8_t fSlaveAddr
 I2C device slave address.
base::BoardfBoard
 board pointer

Related Functions

(Note that these are not member functions.)



std::ostream & operator<< (std::ostream &os, nxyter::NxI2c &obj)
 ostream insertion for nxyter::NxI2c

Detailed Description

Represents the I2C interface of an nXYTER.

This class represents the I2C interface of an nXYTER. It is derived from roc::I2cDevice and provides

Note:
The nxyter::NxContext class represents the nXYTER register context, while this class mediates the access to the nXYTER.

Definition at line 78 of file NxI2c.h.


Constructor & Destructor Documentation

nxyter::NxI2c::NxI2c ( base::Board board,
int  port = 0,
uint8_t  addr = 0 
) [explicit]

Constructor with full addressing path information.

Sets up NxI2c object with full addressing information

Parameters:
board ROC board pointer
port the ROC port (equivalent to the I2C bus interface port)
addr the I2C device slave address

Definition at line 37 of file NxI2c.cxx.

nxyter::NxI2c::~NxI2c (  )  [virtual]

Definition at line 45 of file NxI2c.cxx.


Member Function Documentation

void roc::I2cDevice::addAddrMap ( base::Board board  )  [static, inherited]
base::Board & base::Peripheral::board (  )  [inherited]
const char * nxyter::NxI2c::configurationBitName ( int  bit  )  [static]

Returns descriptive string for configuration bit bit.

The nXYTER has two configuration registers (32 and 33). For the purpose of method the bits are number through, bit 0 is LSB of register 32, bit 8 is LSB of register 33.

Definition at line 575 of file NxI2c.cxx.

Referenced by NxyterWidget::NxyterWidget(), and nxyter::NxContext::print().

uint8_t nxyter::NxI2c::delayToSetting ( uint8_t  delay  )  [static]

Convert delay to a nXYTER delay buffer setting.

The nXYTER delay buffer settings represent the switch settings of the internal delay elements. This method converts a nominal delay value, given as an integer number in the range 0 to 80, into a delay buffer setting suitable to be written into an nXYTER register.

Parameters:
delay delay value, between 0 and 80
Returns:
8 bit setting, ready to be written to delay buffer register
See also:
settingToDelay()
Note:
data taken from nXYTER Manual version: 1.40 (DRAFT) May 25, 2009

Definition at line 608 of file NxI2c.cxx.

Referenced by cmd_setnx(), and settingToDelay().

base::Board* base::Peripheral::getBoard (  )  const [inline, inherited]
int nxyter::NxI2c::getContext ( NxContext cntx,
int  domask = nxyter::kDoAll 
)

Read the part or full context from nXYTER.

The domask allows to enable separately whether the mask, core or trim part of the register set is written.

Parameters:
cntx nXYTER register context container
domask one or several of the mask bits nxyter::kDoMask, nxyter::kDoCore, or nxyter::kDoTrim
Returns:
see roc::Board get/put/oper return codes
Note:
the two nXYTER error counters are not accessed, to read them use the getCounters() method.
for the read of the mask register part the test trigger mode will temporarily disabled in case it is active. This might interfere with data taking and should therefore be avoided when DAQ is active.
See also:
setContext()

Definition at line 119 of file NxI2c.cxx.

References nxyter::NxContext::dataRegisterMain(), nxyter::NxContext::dataRegisterTrim(), getRegCore(), getRegMask(), getRegTrim(), nxyter::kDoCore, nxyter::kDoMask, nxyter::kDoTrim, and base::Board::operErrBuildInc().

Referenced by cmd_autotrim(), cmd_autovbiass(), cmd_idsigch(), cmd_printstatus(), cmd_scanadclat(), cmd_scanmonadc(), cmd_scanvbiasf(), cmd_scanvbiass(), cmd_setnxmask(), cmd_setnxpower(), cmd_setnxtrim(), NxyterWidget::getSubConfig(), printRegisters(), nxyter::FebUtil::saveFeb(), setContext(), nxyter::FebUtil::testFebControlPathCombo(), and nxyter::FebUtil::testNxRegisters().

int nxyter::NxI2c::getCounters ( uint16_t &  overflow,
uint16_t &  tokenmiss 
)

Read and clear the error counters from nXYTER.

Returns the values of the two error counters of the nXYTER. Note that they are read-only and the read access is implemened as read and clear.

Parameters:
overflow Overflow counter
tokenmiss Missing token counter
Returns:
see roc::Board get/put/oper return codes

Definition at line 149 of file NxI2c.cxx.

References roc::I2cDevice::getRegisterArray().

int roc::I2cDevice::getMailboxRegister ( uint8_t  reg,
uint8_t *  val,
int  nval 
) [inherited]

Read from device mailbox register.

Reads nreg 8bit values from a single device register reg. This method is useful for Fifo's or mailbox type registers. The I2C error flags are checked for each transfer, reading is stopped when the first error is detected.

Parameters:
reg first device register number
val value array
nval number of values to read
Returns:
see roc::Board get/put/oper return codes
See also:
setMailboxRegister()

Definition at line 401 of file I2cDevice.cxx.

References roc::I2cDevice::getRegister(), and base::Board::operErrBuild().

int roc::I2cDevice::getPortNumber (  )  const [inline, inherited]

Returns I2C bus port number on ROC.

Definition at line 32 of file I2cDevice.h.

References roc::I2cDevice::fPort.

Referenced by printRegisters().

int nxyter::NxI2c::getRegCore ( uint8_t *  val  ) 

Read the core nXYTER register set.

Reads the core registers, this is all except the mask and trim registers and the read-only overflow and missing token counter registers, thus 16-29,32,33,38,39,43-45.

Parameters:
val array with 46 values
Returns:
see roc::Board get/put/oper return codes
See also:
setRegCore()
Note:
consider to use getContext().

Definition at line 457 of file NxI2c.cxx.

References roc::I2cDevice::getRegisterArray(), and base::Board::operErrBuildInc().

Referenced by getContext().

int roc::I2cDevice::getRegister ( uint8_t  reg,
uint8_t &  val 
) [inherited]
int roc::I2cDevice::getRegister16 ( uint8_t  reg,
uint16_t &  val 
) [inherited]

Read 16 bit from device register.

Reads an 16bit value from device register reg and checks I2C status for error flags.

Parameters:
reg device register number
val value
Returns:
see roc::Board get/put/oper return codes

Definition at line 220 of file I2cDevice.cxx.

References base::Peripheral::board(), roc::I2cDevice::fPort, roc::I2cDevice::fSlaveAddr, roc::I2cDevice::isSPI(), and base::Board::operGen().

Referenced by nxyter::FebBase::discoverFebs(), and nxyter::FebBase::getMonAdc().

int roc::I2cDevice::getRegisterArray ( uint8_t  reg,
uint8_t *  val,
int  nreg 
) [inherited]

Read from device register array.

Reads nreg 8bit values from an array of device registers starting at register number reg. The I2C error flags are checked for each transfer, reading is stopped when the first error is detected.

Parameters:
reg first device register number
val value array
nreg number of registers to read
Returns:
see roc::Board get/put/oper return codes
See also:
setRegisterArray()

Definition at line 350 of file I2cDevice.cxx.

References roc::I2cDevice::getRegister(), and base::Board::operErrBuild().

Referenced by getCounters(), getRegCore(), and getRegMask().

int nxyter::NxI2c::getRegMask ( uint8_t *  val  ) 

Read the mask nXYTER register set.

Reads the mask registers.

Parameters:
val array with 46 values
Returns:
see roc::Board get/put/oper return codes
Note:
consider to use getContext().
for the read of the mask register part the test trigger mode will temporarily disabled in case it is active. This might interfere with data taking and should therefore be avoided when DAQ is active. To retrieve the mask bits directly use getRegisterArray().
See also:
setRegMask()

Definition at line 423 of file NxI2c.cxx.

References roc::I2cDevice::getRegister(), roc::I2cDevice::getRegisterArray(), nxyter::kNxC0TestTrigEnable, nxyter::kNxRegConfig0, and roc::I2cDevice::setRegister().

Referenced by getContext().

int nxyter::NxI2c::getRegTrim ( uint8_t *  val  ) 

Read 129 8 bit data values from the trim-daq register 42.

Parameters:
val array with 129 values, [0..127] holds channel 0 to 127 and [128] the test channel value.
Returns:
see roc::Board get/put/oper return codes
Bug:
This implementation is currently not atomic ! Two concurrent executions of this method will destroy the content of the nXYTER trim-daq register !
Note:
consider to use getContext().
val and nXYTER storage order differ, the test channel data is in val[128] while it is the first value to be read from the chip.
See also:
setRegTrim()

Definition at line 486 of file NxI2c.cxx.

References roc::I2cDevice::getRegister(), nxyter::kNxRegTrimDAQPower, base::Board::operErrBuild(), roc::I2cDevice::setRegister(), and roc::I2cDevice::setRegisterVerify().

Referenced by getContext().

uint8_t roc::I2cDevice::getSlaveAddr (  )  const [inline, inherited]

Return slave address of device on I2C bus.

Definition at line 40 of file I2cDevice.h.

References roc::I2cDevice::fSlaveAddr.

Referenced by cmd_getnx(), nxyter::FebBase::eepromSupport(), nxyter::FebBase::monAdcSupport(), and printRegisters().

bool roc::I2cDevice::isSPI (  )  const [inline, inherited]
void nxyter::NxI2c::printRegisters ( std::ostream &  os,
int  domask = nxyter::kDoAll 
)

Read nXYTER registers and print to stream os.

Reads full register context with getContext() and prints them with NxContext::print(). For details consult the documentation of these two methods.

Definition at line 331 of file NxI2c.cxx.

References getContext(), roc::I2cDevice::getPortNumber(), roc::I2cDevice::getSlaveAddr(), base::Board::operErrToString(), and nxyter::NxContext::print().

Referenced by cmd_printnx(), operator<<(), and nxyter::FebBase::printRegisters().

int nxyter::NxI2c::probe (  ) 

Probe whether an nXYTER exists.

This method tries to test in a reliable but as much as possible non-intrusive way whether an nXYTER chip is accessible under the port and slave address setup for the object. The probe procedure uses the registers

  • 24: test pulse amplitue
  • 38: test pulse delay
  • 39: test trigger delay

and performs four steps

  • read these registers
  • write distinct values into these registers
  • read back and check the distinct values
  • restore the initial settings (saved in first step)

The method aborts and returns with a non-zero return code when any of the above operation or tests fail. In case of success the nXYTER chip is in the same state as before.

The probe is mostly non-intrusive because only registers used in test pulse/trigger modes are used, and should therefore not disput normal operation.

Note:
the obvious simple probe, using the mask registers, doesn't work because a read to register 0-15 does not return the mask registers when the chip is in test trigger mode ! Therefore the registers 24,38, and 39 are used.
Returns:
0 on success and non-zero if any step fails. See roc::Board get/put/oper return codes for details. The index refers to the 12 get and set operations and thus allows to precisely pinpoint at what point the probe aborted.

Definition at line 271 of file NxI2c.cxx.

References roc::I2cDevice::getRegister(), nxyter::kNxRegdelayTestTrig, base::Board::kOperVerifyErr, base::Board::operErrBuild(), and roc::I2cDevice::setRegister().

Referenced by nxyter::FebBase::discoverFebs(), nxyter::FebUtil::probe(), nxyter::FebBase::probe(), and nxyter::FebUtil::testNxControlPath().

const char * nxyter::NxI2c::registerName ( int  reg  )  [static]

Returns name for register reg (or "" if undefined).

Definition at line 513 of file NxI2c.cxx.

Referenced by cmd_getnx(), NxyterWidget::NxyterWidget(), and nxyter::NxContext::print().

int nxyter::NxI2c::setContext ( NxContext cntx,
int  domask = nxyter::kDoAll,
bool  veri = true 
)

Write the part or full context to nXYTER with optional readback verify.

Updates nXYTER registers with the values given by the context cntx. The domask allows to enable separately whether the mask, core or trim part of the register set is written. If veri is true, the context is readback and compared.

Parameters:
cntx nXYTER register context container
domask one or several of the mask bits nxyter::kDoMask, nxyter::kDoCore, or nxyter::kDoTrim
veri if true readback verification done (default is true)
Returns:
see roc::Board get/put/oper return codes.
Note:
for the readback verification of a write of the mask register part the test trigger mode will temporarily disabled in case it is active. This might interfere with data taking and should therefore be avoided when DAQ is active.
See also:
getContext()

Definition at line 71 of file NxI2c.cxx.

References nxyter::NxContext::dataRegisterMain(), nxyter::NxContext::dataRegisterTrim(), nxyter::NxContext::equal(), getContext(), nxyter::kDoCore, nxyter::kDoMask, nxyter::kDoTrim, base::Board::kOperVerifyErr, base::Board::operErrBuild(), base::Board::operErrBuildInc(), setRegCore(), setRegMask(), and setRegTrim().

Referenced by nxyter::FebUtil::acquireTestPulserData(), cmd_autosettrh(), cmd_autotrim(), cmd_autovbiass(), cmd_scanadclat(), cmd_scanmonadc(), cmd_scanvbiasf(), cmd_scanvbiass(), cmd_setnxmask(), cmd_setnxpower(), cmd_setnxtrim(), nxyter::FebUtil::restoreFeb(), NxyterWidget::setSubConfig(), setToDefault(), nxyter::FebUtil::testFebControlPathCombo(), and nxyter::FebUtil::testNxRegisters().

int roc::I2cDevice::setMailboxRegister ( uint8_t  reg,
const uint8_t *  val,
int  nval 
) [inherited]

Write to device mailbox register.

Writes the nreg 8bit values from array val to a single device register reg. This method is useful for Fifo's or mailbox type registers. The I2C error flags are checked for each transfer, writing is stopped when the first error is detected.

Parameters:
reg first device register number
val value array
nval number of values to write
Returns:
see roc::Board get/put/oper return codes
See also:
getMailboxRegister()

Definition at line 376 of file I2cDevice.cxx.

References base::Board::operErrBuild(), and roc::I2cDevice::setRegister().

Referenced by setRegTrim().

void roc::I2cDevice::setPortNumber ( int  port  )  [inline, inherited]

Set I2C bus port number on ROC.

Definition at line 28 of file I2cDevice.h.

References roc::I2cDevice::fPort.

int nxyter::NxI2c::setRegCore ( const uint8_t *  val  ) 

Write the core nXYTER register set.

Writes the core registers, this is all except the mask and trim registers and the read-only overflow and missing token counter registers, thus 16-29,32,33,38,39,43-45.

Parameters:
val array with 46 values
Returns:
see roc::Board get/put/oper return codes
See also:
getRegCore()
Note:
consider to use setContext().

Definition at line 372 of file NxI2c.cxx.

References base::Board::operErrBuildInc(), and roc::I2cDevice::setRegisterArray().

Referenced by setContext().

int roc::I2cDevice::setRegister ( uint8_t  reg,
uint8_t  val,
bool  veri = false 
) [inherited]

Write to device register with optional readback verification.

Writes the 8bit value val to device register reg. If veri is true, the register contents is read back and verified. The I2C status is checked for error flags after the write and optional read cycle.

Parameters:
reg device register number
val value
veri if true readback verification done (default is false)
Returns:
see roc::Board get/put/oper return codes
See also:
getRegister(), setRegisterVerify()

Definition at line 75 of file I2cDevice.cxx.

References base::Peripheral::board(), roc::I2cDevice::fPort, roc::I2cDevice::fSlaveAddr, roc::I2cDevice::isSPI(), base::Board::kOperBusErr, base::Board::operErrBuild(), and base::Board::operGen().

Referenced by nxyter::FebUtil::acquireTestPulserData(), NxyterWidget::biasRegChanged(), cmd_autosettrh(), cmd_autotrim(), cmd_autovbiass(), cmd_scanmonadc(), cmd_scanvbiasf(), cmd_setnx(), get_vbiass_data(), getRegMask(), getRegTrim(), probe(), roc::I2cDevice::setMailboxRegister(), nxyter::FebBase::setNxRegisterAll(), roc::I2cDevice::setRegisterArray(), roc::I2cDevice::setRegisterVerify(), setRegTrim(), setTestModes(), and nxyter::FebUtil::testNxRegisters().

int roc::I2cDevice::setRegisterArray ( uint8_t  reg,
const uint8_t *  val,
int  nreg,
bool  veri = false 
) [inherited]

Write to device register array with optional readback verification.

Writes the nreg 8bit values from array val to an array of device registers starting at register number reg. When veri is true, each value is readback and verified. The I2C error flags are checked for each transfer, writing is stopped when the first error is detected.

Parameters:
reg first device register number
val value array
nreg number of registers to write
veri if true readback verification done (default is false)
Returns:
see roc::Board get/put/oper return codes
See also:
getRegisterArray()

Definition at line 324 of file I2cDevice.cxx.

References base::Board::operErrBuild(), and roc::I2cDevice::setRegister().

Referenced by setRegCore(), and setRegMask().

int roc::I2cDevice::setRegisterVerify ( uint8_t  reg,
uint8_t  valset,
uint8_t &  valget 
) [inherited]

Write to device register and return the readback value.

Writes the 8bit value valset to device register reg, reads it back and returns the readback value in valget. The I2C status is checked for error flags after the write and read cycle.

Parameters:
reg device register number
valset value to be written
valget value returned from readback
Returns:
see roc::Board get/put/oper return codes
Note:
The method just returns the readback value and does not test whether valget equals valset, thus never returns a base::Board::kOperVerifyErr return code.
See also:
setRegister(), getRegister()

Definition at line 270 of file I2cDevice.cxx.

References base::Peripheral::board(), roc::I2cDevice::fPort, roc::I2cDevice::fSlaveAddr, roc::I2cDevice::isSPI(), base::Board::kOperBusErr, base::Board::operErrBuild(), base::Board::operGen(), and roc::I2cDevice::setRegister().

Referenced by getRegTrim().

int nxyter::NxI2c::setRegMask ( const uint8_t *  val  ) 

Write the mask nXYTER register set.

Writes the mask registers.

Parameters:
val array with 46 values
Returns:
see roc::Board get/put/oper return codes
Note:
consider to use setContext().
See also:
getRegMask()

Definition at line 355 of file NxI2c.cxx.

References roc::I2cDevice::setRegisterArray().

Referenced by setContext().

int nxyter::NxI2c::setRegTrim ( const uint8_t *  val  ) 

Write 129 8 bit data values to the trim-daq register 42.

Parameters:
val array with 129 values, [0..127] holds channel 0 to 127 and [128] the test channel value.
Returns:
see roc::Board get/put/oper return codes
Note:
consider to use setContext().
val and nXYTER storage order differ, the test channel data is in val[128] while it is the first value to be written into the chip.
See also:
getRegTrim()

Definition at line 400 of file NxI2c.cxx.

References nxyter::kNxRegTrimDAQPower, base::Board::operErrBuild(), base::Board::operErrBuildInc(), roc::I2cDevice::setMailboxRegister(), and roc::I2cDevice::setRegister().

Referenced by setContext().

void roc::I2cDevice::setSlaveAddr ( uint8_t  addr  )  [inline, inherited]

Set slave address of device on I2C bus.

Definition at line 36 of file I2cDevice.h.

References roc::I2cDevice::fSlaveAddr.

Referenced by cmd_setnxaddr(), and nxyter::Feb1nxGenD::Feb1nxGenD().

int nxyter::NxI2c::setTestModes ( bool  testpuls,
bool  testtrig,
int  calselect 
)

Setup test pulser and test trigger mode.

The test pulse input of the nXYTER can be used to

  • fire a test pulse, coupled into a quarter of the channels
  • force a hit on all channels

This defines four operation modes, all of which have useful applications. This method sets the kNxC0TestPulsEnable and kNxC0TestTrigEnable bits in register kNxRegConfig0 according to the arguments testpuls and testtrig. The test pulse polarity, controlled by bit kNxC0TestPulsPolarity, is set according to the already configured front-end polarity, given by kNxC1FrontEndPolarity in register kNxRegConfig1.

The four possible choices of channel group receiving the test pulse are selected by calselect and written into the kNxC1CalibSelectMask bits of register kNxRegConfig1.

Parameters:
testpuls determines whether test pulser mode is enabled
testtrig determines whether test trigger mode is enabled
calselect determines which channel group receives the test pulse. Only the 2 LSBs are used:

  • 0 will select channels 0,4,8,...,124
  • 1 will select channels 1,5,9,...,125
  • 2 will select channels 2,6,10,...,126
  • 3 will select channels 3,7,11,...,127
Returns:
see roc::Board get/put/oper return codes

Definition at line 195 of file NxI2c.cxx.

References roc::I2cDevice::getRegister(), nxyter::kNxC0TestPulsEnable, nxyter::kNxC0TestPulsPolarity, nxyter::kNxC0TestTrigEnable, nxyter::kNxC1CalibSelectMask, nxyter::kNxC1FrontEndPolarity, nxyter::kNxRegConfig0, nxyter::kNxRegConfig1, base::Board::operErrBuild(), and roc::I2cDevice::setRegister().

Referenced by autoped_setnxmode(), roc::BoardsVector::autoped_setnxmode(), cmd_autovbiass(), cmd_idsigch(), cmd_scanvbiasf(), cmd_scanvbiass(), cmd_setnxmode(), and nxyter::FebBase::setNxTestModes().

uint8_t nxyter::NxI2c::settingToDelay ( uint8_t  val  )  [static]

Convert nXYTER delay buffer setting into a delay.

The nXYTER delay buffer settings represent the switch settings of the internal delay elements. This method converts this setting into a number which should correspond to the delay. It is the inverse of delayToSetting(). It will return 0xff for settings not produced by delayToSetting().

Parameters:
val 8 bit setting, as read from delay buffer register
Returns:
delay value, or 0xff of non-recommended setting seen.
See also:
delayToSetting()

Definition at line 637 of file NxI2c.cxx.

References delay(), and delayToSetting().

Referenced by cmd_getnx(), and nxyter::NxContext::print().

int nxyter::NxI2c::setToDefault ( bool  ispos = false,
int  maskon = 128,
int  poweron = 128 
)

Write default values into nXYTER registers.

Constructs a context with default values with and writes these values into the associated nXYTER. See documentation of NxContext::setToDefault() for description of the parameters ispos, maskon, and poweron.

Returns:
see roc::Board get/put/oper return codes

Definition at line 316 of file NxI2c.cxx.

References setContext(), and nxyter::NxContext::setToDefault().

Referenced by cmd_setnxdef(), and nxyter::FebBase::setToDefault().


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  os,
nxyter::NxI2c obj 
) [related]

ostream insertion for nxyter::NxI2c

Just calls nxyter::NxI2c::printRegisters()

Definition at line 118 of file NxI2c.h.

References printRegisters().


Field Documentation

base::Board* base::Peripheral::fBoard [protected, inherited]

board pointer

Definition at line 26 of file Peripheral.h.

Referenced by base::Peripheral::board(), base::Peripheral::getBoard(), and base::Peripheral::Peripheral().

int roc::I2cDevice::fPort [protected, inherited]
uint8_t roc::I2cDevice::fSlaveAddr [protected, inherited]
int roc::I2cDevice::fUseSPI [protected, inherited]

indicate that SPI->I2C interface for SysCore3 should be used

Definition at line 16 of file I2cDevice.h.

Referenced by roc::I2cDevice::I2cDevice(), and roc::I2cDevice::isSPI().


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