|
UHD
003.000.001
|
#include <dboard_iface.hpp>
Public Types | |
| enum | unit_t { UNIT_RX = 'r', UNIT_TX = 't' } |
| tells the host which unit to use More... | |
| enum | atr_reg_t { ATR_REG_IDLE = 'i', ATR_REG_TX_ONLY = 't', ATR_REG_RX_ONLY = 'r', ATR_REG_FULL_DUPLEX = 'f' } |
| possible atr registers More... | |
| enum | aux_dac_t { AUX_DAC_A = 'a', AUX_DAC_B = 'b', AUX_DAC_C = 'c', AUX_DAC_D = 'd' } |
| aux dac selection enums (per unit) More... | |
| enum | aux_adc_t { AUX_ADC_A = 'a', AUX_ADC_B = 'b' } |
| aux adc selection enums (per unit) More... | |
| typedef boost::shared_ptr< dboard_iface > | sptr |
| typedef dboard_iface_special_props_t | special_props_t |
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 |
Public Member Functions inherited from uhd::i2c_iface | |
| virtual void | write_i2c (boost::uint8_t addr, const byte_vector_t &buf)=0 |
| virtual byte_vector_t | read_i2c (boost::uint8_t addr, size_t num_bytes)=0 |
| virtual void | write_eeprom (boost::uint8_t addr, boost::uint8_t offset, const byte_vector_t &buf) |
| virtual byte_vector_t | read_eeprom (boost::uint8_t addr, boost::uint8_t offset, size_t num_bytes) |
Protected Member Functions | |
| dboard_iface (void) | |
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.
| typedef boost::shared_ptr<dboard_iface> uhd::usrp::dboard_iface::sptr |
|
protected |
Read back an ATR register setting.
| unit | which unit rx or tx |
| reg | which ATR register |
|
pure virtual |
Get the rate of a dboard clock.
| unit | which unit rx or tx |
|
pure virtual |
Get a list of possible rates for the dboard clock.
| unit | which unit rx or tx |
|
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.
| unit | which unit rx or tx |
|
virtual |
Read back the GPIO data direction setting.
| unit | which unit rx or tx |
|
virtual |
Read back the GPIO pin output setting.
| unit | which unit rx or tx |
|
virtual |
Read back the pin control setting.
| unit | which unit rx or tx |
|
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.
|
pure virtual |
Read from an aux adc.
| unit | which unit rx or tx |
| which_adc | the adc index 0, 1, 2, 3... |
|
pure virtual |
Read daughterboard GPIO pin values.
| unit | which unit rx or tx |
|
pure virtual |
Read and write data to SPI bus peripheral.
| unit | which unit, rx or tx |
| config | configuration settings |
| data | the bits to write LSB first |
| num_bits | the number of bits in data |
|
virtual |
Set a daughterboard ATR register.
| unit | which unit rx or tx |
| reg | which ATR register |
| value | 16-bits, 0=ATR output low, 1=ATR output high |
| mask | 16-bits, 0=do not change, 1=change value |
|
pure virtual |
Enable or disable a dboard clock.
| unit | which unit rx or tx |
| enb | true for enabled |
|
pure virtual |
Set the rate of a dboard clock.
| unit | which unit rx or tx |
| rate | the clock rate in Hz |
|
virtual |
Set daughterboard GPIO data direction setting.
| unit | which unit rx or tx |
| value | 16-bits, 0=GPIO input, 1=GPIO output |
| mask | 16-bits, 0=do not change, 1=change value |
|
pure virtual |
Setup the GPIO debug mux.
| unit | which unit rx or tx |
| which | which debug: 0, 1 |
|
virtual |
Set daughterboard GPIO pin output setting.
| unit | which unit rx or tx |
| value | 16-bits, 0=GPIO output low, 1=GPIO output high |
| mask | 16-bits, 0=do not change, 1=change value |
|
virtual |
Set a daughterboard output pin control source.
| unit | which unit rx or tx |
| value | 16-bits, 0=GPIO controlled, 1=ATR controlled |
| mask | 16-bits, 0=do not change, 1=change value |
|
pure virtual |
Write to an aux dac.
| unit | which unit rx or tx |
| which_dac | the dac index 0, 1, 2, 3... |
| value | the value in volts |
|
pure virtual |
Write data to SPI bus peripheral.
| unit | which unit, rx or tx |
| config | configuration settings |
| data | the bits to write LSB first |
| num_bits | the number of bits in data |
1.8.13