From 1a030abcf51b04e0da2776a707c4e77ceca58b5f Mon Sep 17 00:00:00 2001 From: steviez Date: Thu, 9 Jan 2020 17:34:00 -0600 Subject: docs: fixing typos in gpio API example in manual --- host/docs/gpio_api.dox | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'host/docs/gpio_api.dox') diff --git a/host/docs/gpio_api.dox b/host/docs/gpio_api.dox index 54b130da6..05a3ad8e3 100644 --- a/host/docs/gpio_api.dox +++ b/host/docs/gpio_api.dox @@ -90,12 +90,9 @@ GPIO pins you intend to use. To set up the ATR, you use uhd::usrp::multi_usrp::s - **OUT**: Manually set the value of a pin (only to be used in non-ATR mode). - **ATR_0X**: The status of the pins when the radio is **idle**. -- **ATR_RX**: The status of the pins when the radio is only - **receiving**. -- **ATR_TX**: The status of the pins when the radio is only - **transmitting**. -- **ATR_XX**: The status of the pins when the radio is in - **full-duplex** mode. +- **ATR_RX**: The status of the pins when the radio is **receiving** only. +- **ATR_TX**: The status of the pins when the radio is **transmitting** only. +- **ATR_XX**: The status of the pins when the radio is in **full-duplex** mode. The counterpart to setting the ATR (the "getter"), is called uhd::usrp::multi_usrp::get_gpio_attr(). @@ -116,7 +113,7 @@ X3x0 called "FP0" (for E3x0 this will be called "INT0"). This is the bank we wan Let's say we want to use GPIO6 for an external amp. We want it to be automatically controlled by ATR as an output, and we want it to be high -when we are transmitting, and low in all other cases. We are also using +when we are transmitting only, and low in all other cases. We are also using GPIO4, which we want to control manually, as an output. We can set this up with the following code: @@ -145,7 +142,7 @@ up with the following code: // finally, let's set up GPIO6 as we described above usrp_x300->set_gpio_attr("FP0", "ATR_0X", 0, AMP_GPIO_MASK); usrp_x300->set_gpio_attr("FP0", "ATR_RX", 0, AMP_GPIO_MASK); - usrp_x300->set_gpio_attr("FP0", "ATR_TX", 0, AMP_GPIO_MASK); + usrp_x300->set_gpio_attr("FP0", "ATR_TX", 1, AMP_GPIO_MASK); usrp_x300->set_gpio_attr("FP0", "ATR_XX", 0, AMP_GPIO_MASK); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -178,10 +175,10 @@ GPIO bank, where the controlled GPIO is now GPIO3 instead of GPIO6. // let's manually set GPIO4 high usrp_e300->set_gpio_attr("INT0", "OUT", (1 << 4), MAN_GPIO_MASK); - // finally, let's set up GPIO6 as we described above + // finally, let's set up GPIO3 as we described above usrp_e300->set_gpio_attr("INT0", "ATR_0X", 0, AMP_GPIO_MASK); usrp_e300->set_gpio_attr("INT0", "ATR_RX", 0, AMP_GPIO_MASK); - usrp_e300->set_gpio_attr("INT0", "ATR_TX", 0, AMP_GPIO_MASK); + usrp_e300->set_gpio_attr("INT0", "ATR_TX", 1, AMP_GPIO_MASK); usrp_e300->set_gpio_attr("INT0", "ATR_XX", 0, AMP_GPIO_MASK); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3