USRP Hardware Driver and USRP Manual: uhd::features::gpio_power_iface Class Reference

| USRP Hardware Driver and USRP Manual Version: 4.8.0.makepkg-0-g308126a4 UHD and USRP Manual |

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
uhd::features::gpio_power_iface Class Referenceabstract

`#include <uhd/features/gpio_power_iface.hpp>`

Inheritance diagram for uhd::features::gpio_power_iface:

## Public Types
using | sptr = std::shared_ptr<gpio_power_iface>
Public Types inherited from uhd::features::discoverable_feature
enum | feature_id_t { RESERVED0 , RESERVED1 , FPGA_LOAD_NOTIFICATION , ADC_SELF_CALIBRATION , REF_CLK_CALIBRATION , TRIG_IO_MODE , GPIO_POWER , SPI_GETTER_IFACE , INTERNAL_SYNC }
| An enum of all features supported by the driver. When creating a new. More...
using | sptr = std::shared_ptr<discoverable_feature>

## Public Member Functions
std::string | get_feature_name () const
| Returns a human-readable string name of this feature.
virtual | ~gpio_power_iface ()=default
virtual std::vector< std::string > | get_supported_voltages (const std::string &port) const =0
virtual void | set_port_voltage (const std::string &port, const std::string &voltage)=0
virtual std::string | get_port_voltage (const std::string &port) const =0
virtual void | set_external_power (const std::string &port, bool enable)=0
virtual std::string | get_external_power_status (const std::string &port) const =0
Public Member Functions inherited from uhd::features::discoverable_feature
virtual | ~discoverable_feature ()=default

## Static Public Member Functions
static discoverable_feature::feature_id_t | get_feature_id ()

## Detailed Description

Interface to provide access to configuring the voltage level and external power export configurations of GPIO banks.

## Member Typedef Documentation

## ◆ sptr

using uhd::features::gpio_power_iface::sptr = std::shared_ptr<gpio_power_iface>

## Constructor & Destructor Documentation

## ◆ ~gpio_power_iface()

virtual uhd::features::gpio_power_iface::~gpio_power_iface | ( |  | ) |
| virtualdefault

## Member Function Documentation

## ◆ get_external_power_status()

virtual std::string uhd::features::gpio_power_iface::get_external_power_status | ( | const std::string & | port | ) | const
| pure virtual

Retrieve the status of the external power on the given port. The status can be one of three values: "OFF" - External power is disabled (the default) "ON" - External power is on and functioning normally "FAULT" - The external power supply has encountered a fault condition.

Parameters

  port | Port to retrieve status from

## ◆ get_feature_id()

static discoverable_feature::feature_id_t uhd::features::gpio_power_iface::get_feature_id | ( |  | ) |
| inlinestatic

## ◆ get_feature_name()

std::string uhd::features::gpio_power_iface::get_feature_name | ( |  | ) | const
| inlinevirtual

Returns a human-readable string name of this feature.

Implements uhd::features::discoverable_feature.

## ◆ get_port_voltage()

virtual std::string uhd::features::gpio_power_iface::get_port_voltage | ( | const std::string & | port | ) | const
| pure virtual

Gets the current I/O voltage level that the port is set to.

Parameters

  port | Port to retrieve the voltage level for

Returns
  The voltage level for the given port

## ◆ get_supported_voltages()

virtual std::vector< std::string > uhd::features::gpio_power_iface::get_supported_voltages | ( | const std::string & | port | ) | const
| pure virtual

Return what I/O voltage levels are supported on the given port. Voltages use a V in place of the decimal point - typical values include "1V8" for 1.8 volts, "3V3" for 3.3 volts, et cetera.

Parameters

  port | Port to list supported voltages for.

Returns
  A vector of supported voltage levels.

## ◆ set_external_power()

virtual void uhd::features::gpio_power_iface::set_external_power | ( | const std::string & | port,
|  | bool | enable )
| pure virtual

Enables or disables the power supply exposed through the GPIO ports. The GPIO lines will function without external power enabled - the power supply is simply to provide a means for external circuitry to receive power from the device. See your device's documentation for more information on the voltage and current specifications of the external power supply.

Parameters

  port | The port to export power through.
  enable | true to enable power, false to disable.

## ◆ set_port_voltage()

virtual void uhd::features::gpio_power_iface::set_port_voltage | ( | const std::string & | port,
|  | const std::string & | voltage )
| pure virtual

Set the I/O voltage on the given port to the given value.

Parameters

  port | Port to set the voltage on.
  voltage | Voltage level to set. See get_supported_voltages for a list of supported voltages.

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

- gpio_power_iface.hpp