Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
university:tools:pluto:hacking:listening_to_yourself [11 Jul 2019 02:04]
Travis Collins Small tweaks
university:tools:pluto:hacking:listening_to_yourself [13 Jul 2019 02:23]
Robin Getz [Tx Off]
Line 36: Line 36:
 dev '​ad9361-phy',​ channel '​altvoltage1'​ (output), id '​TX_LO',​ attr '​powerdown',​ value '​1'​ dev '​ad9361-phy',​ channel '​altvoltage1'​ (output), id '​TX_LO',​ attr '​powerdown',​ value '​1'​
 </​xterm>​ </​xterm>​
 +
 +This is the equivalent C source of:
 +<​code>​
 +    /* Create IIO Context */
 +    ctx = iio_create_context_from_uri("​usb:​1.3.5"​);​
 +
 +    /* Find IIO device in current context */
 +    dev = iio_context_find_device(ctx,​ "​ad9361-phy"​);​
 +
 +    /* Find the IIO output channel in the current device */
 +    ch = iio_device_find_channel(dev,​ "​TX_LO",​ true);
 +
 +     /* Write a one into the IIO channel attribute */
 +    ret = iio_channel_attr_write_longlong(dev,​ "​powerdown",​ 1);
 +</​code>​
  
 Then we get: Then we get:
university/tools/pluto/hacking/listening_to_yourself.txt · Last modified: 05 Aug 2019 23:06 by Robin Getz