-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tws_delayMicroseconds? #8
Comments
On 2013.12.17 01:23 , mattgilbertnet wrote:
delaymicroseconds is a bit tricky to implement, especially if you want Doing function calls like TinyWireS_stop_check() there will completely You could do a naive implementation that looks something like this: tws_delayMicroseconds_inaccurate(uint16_t usec) but it will be wildly inaccurate, the overhead per iteration is going to So if you need microsecond timing you're better off disabling interrupts /Rambo |
Thanks! This looks pretty straightforward, and since precise timing is less important for my application than having some range of timing on the scale of microseconds, I think this will do the trick. |
This is just a nit, but wouldn't the naive loop be better written precalculating the end time?:
|
@jockm: Please don't use " |
@carycode Fair point, but you should note that I was just copying rambo's style from above. This comment is better addressed there |
This is really a feature request more than an "issue".
This is surely a low priority, if it's even a concern for anyone other than me, but is there any chance of a tws_delayMicroseconds() being implemented?
The text was updated successfully, but these errors were encountered: