On Wed, 2012-09-19 at 14:30 -0700, Adrian Chadd wrote: > On 19 September 2012 14:12, Ian Lepore <freebsd_at_damnhippie.dyndns.org> wrote: > > >> Right. Being totally clueless, is atrc_start() called just at > >> probe/attach, or during normal operation? > >> > > > > It's called just once, from the attach() routine for the rtc device. > > Right. Just have it loop over say 100 times, with a 10us sleep between > each. Shouldn't that be enough? > If by "sleep" you mean any form of pausing or sleeping that waits for a given amount of time... remember when this code is running we're still in the process of trying to figure out which clocks can be used for such purposes. That leaves DELAY(), which does pretty much the equivelent of what the loop in question is doing. Hmmm, but DELAY() does have the advantage of busy-looping for a known amount of time, making it easier to constrain the time spent in the loop regardless of the speed of the cpu. I'll have to look into how DELAY() is implemented for x86 and see if it's usable in this context. -- IanReceived on Wed Sep 19 2012 - 19:51:42 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC