diff options
author | steviez <steve.czabaniuk@ni.com> | 2020-01-09 17:34:00 -0600 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2020-01-10 10:51:14 -0800 |
commit | 1a030abcf51b04e0da2776a707c4e77ceca58b5f (patch) | |
tree | bcd6d4dc9fa54dec22abb162ebcf9269a667158d /host/docs/gpio_api.dox | |
parent | 9c00d2f3e3d366c07702ac946ff091e43cb7a3c3 (diff) | |
download | uhd-1a030abcf51b04e0da2776a707c4e77ceca58b5f.tar.gz uhd-1a030abcf51b04e0da2776a707c4e77ceca58b5f.tar.bz2 uhd-1a030abcf51b04e0da2776a707c4e77ceca58b5f.zip |
docs: fixing typos in gpio API example in manual
Diffstat (limited to 'host/docs/gpio_api.dox')
-rw-r--r-- | host/docs/gpio_api.dox | 17 |
1 files changed, 7 insertions, 10 deletions
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); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |