USRP Hardware Driver and USRP Manual  Version: 003.009.003-0-gf0720677
UHD and USRP Manual
uhd::usrp::dboard_iface Class Referenceabstract

#include <uhd/usrp/dboard_iface.hpp>

Inheritance diagram for uhd::usrp::dboard_iface:
uhd::i2c_iface

Public Types

enum  unit_t { UNIT_RX = int('r'), UNIT_TX = int('t') }
 tells the host which unit to use More...
 
enum  atr_reg_t { ATR_REG_IDLE = int('i'), ATR_REG_TX_ONLY = int('t'), ATR_REG_RX_ONLY = int('r'), ATR_REG_FULL_DUPLEX = int('f') }
 possible atr registers More...
 
enum  aux_dac_t { AUX_DAC_A = int('a'), AUX_DAC_B = int('b'), AUX_DAC_C = int('c'), AUX_DAC_D = int('d') }
 aux dac selection enums (per unit) More...
 
enum  aux_adc_t { AUX_ADC_A = int('a'), AUX_ADC_B = int('b') }
 aux adc selection enums (per unit) More...
 
typedef boost::shared_ptr< dboard_ifacesptr
 
typedef dboard_iface_special_props_t special_props_t
 
- Public Types inherited from uhd::i2c_iface
typedef boost::shared_ptr< i2c_ifacesptr
 

Public Member Functions

virtual special_props_t get_special_props (void)=0
 
virtual void write_aux_dac (unit_t unit, aux_dac_t which_dac, double value)=0
 
virtual double read_aux_adc (unit_t unit, aux_adc_t which_adc)=0
 
virtual void set_pin_ctrl (unit_t unit, boost::uint16_t value, boost::uint16_t mask=0xffff)
 
virtual boost::uint16_t get_pin_ctrl (unit_t unit)
 
virtual void set_atr_reg (unit_t unit, atr_reg_t reg, boost::uint16_t value, boost::uint16_t mask=0xffff)
 
virtual boost::uint16_t get_atr_reg (unit_t unit, atr_reg_t reg)
 
virtual void set_gpio_ddr (unit_t unit, boost::uint16_t value, boost::uint16_t mask=0xffff)
 
virtual boost::uint16_t get_gpio_ddr (unit_t unit)
 
virtual void set_gpio_out (unit_t unit, boost::uint16_t value, boost::uint16_t mask=0xffff)
 
virtual boost::uint16_t get_gpio_out (unit_t unit)
 
virtual void set_gpio_debug (unit_t unit, int which)=0
 
virtual boost::uint16_t read_gpio (unit_t unit)=0
 
virtual void write_spi (unit_t unit, const spi_config_t &config, boost::uint32_t data, size_t num_bits)=0
 
virtual boost::uint32_t read_write_spi (unit_t unit, const spi_config_t &config, boost::uint32_t data, size_t num_bits)=0
 
virtual void set_clock_rate (unit_t unit, double rate)=0
 
virtual double get_clock_rate (unit_t unit)=0
 
virtual std::vector< double > get_clock_rates (unit_t unit)=0
 
virtual void set_clock_enabled (unit_t unit, bool enb)=0
 
virtual double get_codec_rate (unit_t unit)=0
 
virtual uhd::time_spec_t get_command_time (void)
 
virtual void set_command_time (const uhd::time_spec_t &t)
 
virtual ~dboard_iface (void)
 
- Public Member Functions inherited from uhd::i2c_iface
virtual ~i2c_iface (void)
 
i2c_iface::sptr eeprom16 (void)
 Create an i2c_iface than can talk to 16 bit addressable EEPROMS. More...
 
virtual void write_i2c (boost::uint16_t addr, const byte_vector_t &buf)=0
 
virtual byte_vector_t read_i2c (boost::uint16_t addr, size_t num_bytes)=0
 
virtual void write_eeprom (boost::uint16_t addr, boost::uint16_t offset, const byte_vector_t &buf)
 
virtual byte_vector_t read_eeprom (boost::uint16_t addr, boost::uint16_t offset, size_t num_bytes)
 

Protected Member Functions

 dboard_iface (void)
 

Detailed Description

The daughter board dboard interface to be subclassed. A dboard instance interfaces with the mboard though this api. This interface provides i2c, spi, gpio, atr, aux dac/adc access. Each mboard should have a specially tailored iface for its dboard.

Member Typedef Documentation

◆ special_props_t

◆ sptr

typedef boost::shared_ptr<dboard_iface> uhd::usrp::dboard_iface::sptr

Member Enumeration Documentation

◆ atr_reg_t

possible atr registers

Enumerator
ATR_REG_IDLE 
ATR_REG_TX_ONLY 
ATR_REG_RX_ONLY 
ATR_REG_FULL_DUPLEX 

◆ aux_adc_t

aux adc selection enums (per unit)

Enumerator
AUX_ADC_A 
AUX_ADC_B 

◆ aux_dac_t

aux dac selection enums (per unit)

Enumerator
AUX_DAC_A 
AUX_DAC_B 
AUX_DAC_C 
AUX_DAC_D 

◆ unit_t

tells the host which unit to use

Enumerator
UNIT_RX 
UNIT_TX 

Constructor & Destructor Documentation

◆ dboard_iface()

uhd::usrp::dboard_iface::dboard_iface ( void  )
protected

◆ ~dboard_iface()

virtual uhd::usrp::dboard_iface::~dboard_iface ( void  )
virtual

Member Function Documentation

◆ get_atr_reg()

virtual boost::uint16_t uhd::usrp::dboard_iface::get_atr_reg ( unit_t  unit,
atr_reg_t  reg 
)
virtual

Read back an ATR register setting.

Parameters
unitwhich unit rx or tx
regwhich ATR register
Returns
the 16-bit settings value

◆ get_clock_rate()

virtual double uhd::usrp::dboard_iface::get_clock_rate ( unit_t  unit)
pure virtual

Get the rate of a dboard clock.

Parameters
unitwhich unit rx or tx
Returns
the clock rate in Hz

◆ get_clock_rates()

virtual std::vector<double> uhd::usrp::dboard_iface::get_clock_rates ( unit_t  unit)
pure virtual

Get a list of possible rates for the dboard clock.

Parameters
unitwhich unit rx or tx
Returns
a list of clock rates in Hz

◆ get_codec_rate()

virtual double uhd::usrp::dboard_iface::get_codec_rate ( unit_t  unit)
pure virtual

Get the rate of the codec. For rx, this is the rate the ADC feeds the DSP. For tx, this is the rate the DSP feeds the DAC.

Parameters
unitwhich unit rx or tx
Returns
the codec rate in Hz

◆ get_command_time()

virtual uhd::time_spec_t uhd::usrp::dboard_iface::get_command_time ( void  )
virtual

Get the command time.

Returns
the command time

◆ get_gpio_ddr()

virtual boost::uint16_t uhd::usrp::dboard_iface::get_gpio_ddr ( unit_t  unit)
virtual

Read back the GPIO data direction setting.

Parameters
unitwhich unit rx or tx
Returns
the 16-bit settings value

◆ get_gpio_out()

virtual boost::uint16_t uhd::usrp::dboard_iface::get_gpio_out ( unit_t  unit)
virtual

Read back the GPIO pin output setting.

Parameters
unitwhich unit rx or tx
Returns
the 16-bit settings value

◆ get_pin_ctrl()

virtual boost::uint16_t uhd::usrp::dboard_iface::get_pin_ctrl ( unit_t  unit)
virtual

Read back the pin control setting.

Parameters
unitwhich unit rx or tx
Returns
the 16-bit settings value

◆ get_special_props()

virtual special_props_t uhd::usrp::dboard_iface::get_special_props ( void  )
pure virtual

Get special properties information for this dboard slot. This call helps the dboard code to handle implementation differences between different motherboards and dboard slots.

Returns
the special properties struct

◆ read_aux_adc()

virtual double uhd::usrp::dboard_iface::read_aux_adc ( unit_t  unit,
aux_adc_t  which_adc 
)
pure virtual

Read from an aux adc.

Parameters
unitwhich unit rx or tx
which_adcthe adc index 0, 1, 2, 3...
Returns
the value in volts

◆ read_gpio()

virtual boost::uint16_t uhd::usrp::dboard_iface::read_gpio ( unit_t  unit)
pure virtual

Read daughterboard GPIO pin values.

Parameters
unitwhich unit rx or tx
Returns
the value of the gpio unit

◆ read_write_spi()

virtual boost::uint32_t uhd::usrp::dboard_iface::read_write_spi ( unit_t  unit,
const spi_config_t config,
boost::uint32_t  data,
size_t  num_bits 
)
pure virtual

Read and write data to SPI bus peripheral.

Parameters
unitwhich unit, rx or tx
configconfiguration settings
datathe bits to write MSB first
num_bitsthe number of bits in data
Returns
the data that was read

◆ set_atr_reg()

virtual void uhd::usrp::dboard_iface::set_atr_reg ( unit_t  unit,
atr_reg_t  reg,
boost::uint16_t  value,
boost::uint16_t  mask = 0xffff 
)
virtual

Set a daughterboard ATR register.

Parameters
unitwhich unit rx or tx
regwhich ATR register
value16-bits, 0=ATR output low, 1=ATR output high
mask16-bits, 0=do not change, 1=change value

◆ set_clock_enabled()

virtual void uhd::usrp::dboard_iface::set_clock_enabled ( unit_t  unit,
bool  enb 
)
pure virtual

Enable or disable a dboard clock.

Parameters
unitwhich unit rx or tx
enbtrue for enabled

◆ set_clock_rate()

virtual void uhd::usrp::dboard_iface::set_clock_rate ( unit_t  unit,
double  rate 
)
pure virtual

Set the rate of a dboard clock.

Parameters
unitwhich unit rx or tx
ratethe clock rate in Hz

◆ set_command_time()

virtual void uhd::usrp::dboard_iface::set_command_time ( const uhd::time_spec_t t)
virtual

Set the command time.

Parameters
tthe time

◆ set_gpio_ddr()

virtual void uhd::usrp::dboard_iface::set_gpio_ddr ( unit_t  unit,
boost::uint16_t  value,
boost::uint16_t  mask = 0xffff 
)
virtual

Set daughterboard GPIO data direction setting.

Parameters
unitwhich unit rx or tx
value16-bits, 0=GPIO input, 1=GPIO output
mask16-bits, 0=do not change, 1=change value

◆ set_gpio_debug()

virtual void uhd::usrp::dboard_iface::set_gpio_debug ( unit_t  unit,
int  which 
)
pure virtual

Setup the GPIO debug mux.

Parameters
unitwhich unit rx or tx
whichwhich debug: 0, 1

◆ set_gpio_out()

virtual void uhd::usrp::dboard_iface::set_gpio_out ( unit_t  unit,
boost::uint16_t  value,
boost::uint16_t  mask = 0xffff 
)
virtual

Set daughterboard GPIO pin output setting.

Parameters
unitwhich unit rx or tx
value16-bits, 0=GPIO output low, 1=GPIO output high
mask16-bits, 0=do not change, 1=change value

◆ set_pin_ctrl()

virtual void uhd::usrp::dboard_iface::set_pin_ctrl ( unit_t  unit,
boost::uint16_t  value,
boost::uint16_t  mask = 0xffff 
)
virtual

Set a daughterboard output pin control source.

Parameters
unitwhich unit rx or tx
value16-bits, 0=GPIO controlled, 1=ATR controlled
mask16-bits, 0=do not change, 1=change value

◆ write_aux_dac()

virtual void uhd::usrp::dboard_iface::write_aux_dac ( unit_t  unit,
aux_dac_t  which_dac,
double  value 
)
pure virtual

Write to an aux dac.

Parameters
unitwhich unit rx or tx
which_dacthe dac index 0, 1, 2, 3...
valuethe value in volts

◆ write_spi()

virtual void uhd::usrp::dboard_iface::write_spi ( unit_t  unit,
const spi_config_t config,
boost::uint32_t  data,
size_t  num_bits 
)
pure virtual

Write data to SPI bus peripheral.

Parameters
unitwhich unit, rx or tx
configconfiguration settings
datathe bits to write MSB first
num_bitsthe number of bits in data

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