Re: Regarding generic_buffer.c Application for Android

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

 



Why this is happening with generic_buffer application that it
sometimes fails to open the device handles of Accelerometer and after
I follow the STEP -> sleep -> run  the application -> wakeup using the
power button of the device, the application gets the device handles
and polls the Accelerometer correctly .
The frequency of this behavior is random.
Why is it so?

Thanks and Rgds,
-S
PS: Please ignore if you get this mail twice, Some problem in sending the mail.

On Mon, Apr 20, 2015 at 4:04 PM, s.rawat <imsaurabhrawat@xxxxxxxxx> wrote:
> After I allow  the device to go into sleep(pressing power button once)
> and then run  the generic_buffer app and then make the device wake-up
> the app works fine.I don't know if going into the sleep and waking it
> up does some sort of reset to the application variables or file
> descriptor.
>
> On Mon, Apr 13, 2015 at 3:35 PM, s.rawat <imsaurabhrawat@xxxxxxxxx> wrote:
>> +closedir(dp)
>> +dp = opendir(scan_el_dir);
>>
>> This seems to work fine.But sometimes polling accel throws error :
>> failed to open /dev/iio:device0 .
>>
>> sorry for reposts : Changed the browser.Was not able to send in "Plain
>> text mode"
>>
>> On Mon, Apr 13, 2015 at 11:56 AM, Jonathan Cameron
>> <jic23@xxxxxxxxxxxxxxxxxxxxx> wrote:
>>>
>>>
>>> On 13 April 2015 04:40:17 BST, "s.rawat" <imsaurabhrawat@xxxxxxxxx> wrote:
>>>>On Fri, Apr 10, 2015 at 11:49 AM, Jonathan Cameron <jic23@xxxxxxxxxx>
>>>>wrote:
>>>>> Hit google
>>>>> http://pubs.opengroup.org/onlinepubs/009695399/functions/seekdir.html
>>>>> So for POSIX compliance they are optional.
>>>>
>>>>You mean seekdir(dp, 0); in function inline int
>>>>build_channel_array(...) is optional?If I comment it, will it have no
>>>>effect? This function is called inside main() of generic_buffer.c and
>>>>I cant get it compiled with the tool chain I have.Is there any
>>>>alternate code I can replace it with if it is Not Optional?
>>> The functionality is not optional. There is no obligation for the operating system to implement seekdir.
>>>
>>> Here equivalent is probably to close and reopen the directory.
>>>>
>>>>I can take care of le16toh/be16toh.
>>>>
>>>>Thanks and Rgds,
>>>>S
>>>
>>> --
>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
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