diff options
author | Lane Kolbly <lane.kolbly@ni.com> | 2021-12-21 13:29:14 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-05 09:58:21 -0600 |
commit | bc653b9c6fb904ccc40dcf658c1f71e2def54a7b (patch) | |
tree | ba504a37807740805f5c78ffcbbf8fbb5d458e09 /host/docs/x400_gpio_api.dox | |
parent | 25d8d6f611851d587e98607cba79a5bb74db2cb1 (diff) | |
download | uhd-bc653b9c6fb904ccc40dcf658c1f71e2def54a7b.tar.gz uhd-bc653b9c6fb904ccc40dcf658c1f71e2def54a7b.tar.bz2 uhd-bc653b9c6fb904ccc40dcf658c1f71e2def54a7b.zip |
host: docs: Fix incorrect usage in GPIO docs
Diffstat (limited to 'host/docs/x400_gpio_api.dox')
-rw-r--r-- | host/docs/x400_gpio_api.dox | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/host/docs/x400_gpio_api.dox b/host/docs/x400_gpio_api.dox index e1b7af279..80c59cae7 100644 --- a/host/docs/x400_gpio_api.dox +++ b/host/docs/x400_gpio_api.dox @@ -102,8 +102,8 @@ discoverable feature attached to the mb_controller: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp} auto usrp = uhd::usrp::multi_usrp::make("type=x4xx"); -auto gpio = usrp->get_mb_controller().get_feature<uhd::rfnoc::discoverable_feature::GPIO_POWER>(); -gpio->set_external_power("GPIO1", true); // Enable external power on GPIO1 +auto& gpio = usrp->get_mb_controller().get_feature<uhd::features::gpio_power_iface>(); +gpio.set_external_power("GPIO1", true); // Enable external power on GPIO1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The status of the external power supply can be queried using @@ -123,8 +123,8 @@ uhd::features::gpio_power_iface::set_port_voltage() API: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp} auto usrp = uhd::usrp::multi_usrp::make("type=x4xx"); -auto gpio = usrp->get_mb_controller().get_feature<uhd::rfnoc::discoverable_feature::GPIO_POWER>(); -gpio->set_port_voltage("GPIO0", "2V5"); // Set GPIO0 voltage to 2.5V +auto& gpio = usrp->get_mb_controller().get_feature<uhd::features::gpio_power_iface>(); +gpio.set_port_voltage("GPIO0", "2V5"); // Set GPIO0 voltage to 2.5V ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Valid values can be enumerated with the uhd::features::gpio_power_iface::supported_voltages() call, and are "1V8", |