dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Update to the AJRv1 recharging

Re: Update to the AJRv1 recharging

From: Jerry Van Baren <>
Date: Wed, 23 Feb 2005 15:24:05 -0500

Jens Arnold wrote:
> Hello Jerry


>>An update: In the software I attempt to close the
>>powermgmt.csv file when USB is plugged in, but I'm not sure it
>>is successful. I ran a recharge test overnight and ended up
>>with a zero length file :-(.
> This close() attempt cannot work the way it is implemented,
> because the usb_inserted() check is asynchronous to the other
> threads. Chances are >99% that the USB connection is already
> accepted and disk control handed over to the USB bridge when
> this code snippet runs.
> If you want to implement it the proper way, you would have to
> give the power thread an event queue. This would then require
> the power thread to accept the USB connection, and it has the
> chance to close the file before doing so. Of course introducing
> an event queue then complicates the timing, because the thread
> cannot simply sleep a determined amount of time.
> Regards, Jens

Hi Jens,

Thanks for the tip. The logging is only for test purposes, it isn't
worth the complications of a queue, etc. I was just hoping that a
simple close would get the job done. My "work-around" is satisfactory
(at least to me), given that the logging "feature" is something that
only a very few people will be using.

Received on 2005-02-23

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy