From bc653b9c6fb904ccc40dcf658c1f71e2def54a7b Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Tue, 21 Dec 2021 13:29:14 -0600 Subject: host: docs: Fix incorrect usage in GPIO docs --- host/docs/x400_gpio_api.dox | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'host/docs') 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(); -gpio->set_external_power("GPIO1", true); // Enable external power on GPIO1 +auto& gpio = usrp->get_mb_controller().get_feature(); +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(); -gpio->set_port_voltage("GPIO0", "2V5"); // Set GPIO0 voltage to 2.5V +auto& gpio = usrp->get_mb_controller().get_feature(); +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", -- cgit v1.2.3