Rockbox mail archive
Subject: Re: time sync
From: Peter Grecian (peter-g_at_moving-picture.co.uk)
VanBaren, Gerald (AGRE) wrote:
>That's very clever. One thought to simplify it (thoughts are cheap, implmentation is a different matter ;-) is to put the timesync code in the portion of Rockbox that is running when the USB is connected. That code simply sits & spins, waiting for the USB to be disconnected.
>My thought is to add to the USB spin loop...
> 1 Watch the f1 key (or any key for that matter) while the USB was connected.
> 2 When the key is pressed, start a time counter.
>Meanwhile, on the PC...
> 3 Write a file which will inherently have a timestamp (and you could put a
> timestamp inside if you wished) when the <ENTER> key was pressed.
>When the PC is disconnected (hopefully fairly soon)...
> 4 The USB spin loop will see that the PC was disconnected. It can then look
> at the timestamp on (in) the special file, add the delta time it was
> accumulating from step 2, and viola' time setting capability.
>I have not looked at the Rockbox code in this area to verify this would work and how difficult it would be, but it sounds good in email.
Thats neat - much more automated.
It would be interesting to see what the USB spin loop
is capable of. Race you to implement something :)
Thanks for your comments.
Peter Grecian ¦ mailto:peter-g_at_moving-picture.co.uk
The Moving Picture Co ¦ http://www.moving-picture.co.uk
127 Wardour St, Soho ¦ T:020 7434 3100 F:020 7437 3951
London, UK, W1F 0NL ¦ Lat 51:30:48 Long -0:07:58
Page was last modified "Jan 10 2012" The Rockbox Crew