reading data from hmc5883

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm runnig 3.5-rc2 kernel on my board with hmc5883 magnetometer.
I've check iio documentation but cannot figure out how to read data from
device. Node /dev/iio:device0 is properly created.
I try both test programs: generic_buffer and iio_event_monitor but
both gives me an error:
iio_event_monitor:
./iio_monitor hmc5883
Found IIO device with name hmc5883 with device number 0
Failed to read event from device: Bad file descriptor

IMO this is because hmc5883 don't have event_attrs set and then this fail.

generic_buffer:
./generic -n hmc5883
iio device number being used is 0
Failed to find the trigger hmc5883-dev0

Not sure about that one but seems trigger is missing (hmc5883 use
INDIO_DIRECT_MODE)

Is there other way how to read data from device or only possibility is
by reading sysfs (no polling ?) ?
Or it is just simple open device -> sleep on poll and when wake -> read data?

Thanks in advance,

Marek
-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux