#include <uhd/features/gpio_power_iface.hpp>
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 } |
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. More... | |
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 |
virtual std::string | get_feature_name () const =0 |
Returns a human-readable string name of this feature. More... | |
Static Public Member Functions | |
static discoverable_feature::feature_id_t | get_feature_id () |
Interface to provide access to configuring the voltage level and external power export configurations of GPIO banks.
using uhd::features::gpio_power_iface::sptr = std::shared_ptr<gpio_power_iface> |
|
virtualdefault |
|
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.
port | Port to retrieve status from |
|
inlinestatic |
|
inlinevirtual |
Returns a human-readable string name of this feature.
Implements uhd::features::discoverable_feature.
|
pure virtual |
Gets the current I/O voltage level that the port is set to.
port | Port to retrieve the voltage level for |
|
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.
port | Port to list supported voltages for. |
|
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.
port | The port to export power through. |
enable | true to enable power, false to disable. |
|
pure virtual |
Set the I/O voltage on the given port to the given value.
port | Port to set the voltage on. |
voltage | Voltage level to set. See get_supported_voltages for a list of supported voltages. |