-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iio_attr: make dealing with devices with no name easier.
---------- I've been through libiio on devices with no name It felt good to be out of the rain In the libiio you don't need remember your name 'Cause there ain't no one for to give you no pain apologies Dewey Bunnell ----------- Some properly formed iio devices have no name attribute, so don't force people to use a name when refering to them. Now when you find devices like this (no name), you can refer to things by the ID. $ ./tests/iio_attr -u ip:192.168.1.120 -d IIO context has 7 devices: iio:device1, ad9361-phy: found 18 device attributes iio:device3, cf-ad9361-dds-core-lpc: found 0 device attributes iio:device4, cf-ad9361-lpc: found 0 device attributes iio_sysfs_trigger: found 2 device attributes trigger0, sysfstrig1: found 1 device attributes iio ID and name can be used interchangeably $ ./tests/iio_attr -u ip:192.168.1.120 -d iio:device2 dev 'xadc', attr 'sampling_frequency', value :'961538' $ ./tests/iio_attr -u ip:192.168.1.120 -d xadc dev 'xadc', attr 'sampling_frequency', value :'961538' And when there is no name at all, you can just use the ID. $ ./tests/iio_attr -u ip:192.168.1.120 -d iio_sysfs_trigger dev 'iio_sysfs_trigger', attr 'add_trigger', value :ERROR: Unknown error 13 (-13) dev 'iio_sysfs_trigger', attr 'remove_trigger', value :ERROR: Unknown error 13 (-13) devices which are triggers will show up as triggers: ./tests/iio_attr -u ip:192.168.1.120 -d sysfstrig1 trig 'sysfstrig1', attr 'trigger_now', value :ERROR: Unknown error 13 (-13) Signed-off-by: Robin Getz <[email protected]>
- Loading branch information
Showing
1 changed file
with
60 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters