Re: reading data from hmc5883

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

 



On Thu, Jun 21, 2012 at 2:53 AM, Belisko Marek <marek.belisko@xxxxxxxxx> wrote:
> 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?

If that is all you need how about doing that in userspace?

>
> Thanks in advance,
--
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