-
Notifications
You must be signed in to change notification settings - Fork 16
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
Can osDelay be emulated via getTimeStamp? #9
Comments
Could it be implemented that way: yes |
How about constructor variants? If osDelay not passed => emulate |
Why though 😂 |
Is library for "hardware first" or for "user first"? I can operate in any context :). But as OSS developper, wishing to make project popular, i'd prefer "user first" approach when possible.
IMO such statements are discuss-able only when metrics/bounds available. Without clear criterias talk will tend to fall into holywar without constructive output :) |
Its user-first assuming user is at least competent in knowing roughly what they are setting up.
Naturally, and to prove this point ill just save that my preference is smaller code size and to leave it up to the user to handle at their discretion. Given how trivial of a function it is in the simplest case, and how complex it can be in complex cases; that is a wide enough span to prefer to encourage the user to use their available functions. :) |
I have nothing against your personal preferences/expectations, but IMO possible use is more wide. |
I completely agree with your statements, but if you are using a framework that is integrating this code, its that framworks job to provide a good user experience for integrations. The minimal required functions are relatively workable, while not abstracted away to the point of being useless for custom integrations. I agree that example is quite long, but it could be shortened easily, but prefer the most verbose example possible. No-one is going to download vscode + this library and be able to flash it to a board. There is at least a good 2 more steps in the middle there. A lot of the work on installing this code, or how to hook to i2c or how to hook to delay is partly on those frameworks more so than this library. |
Just to add to the discussion, I'm looking to eventually implement this without a blocking function as well. |
PolicyEngine
already hasgetTimeStamp
, but still requiresosDelay
for rare cases. CanosDelay
be emulated via getTimeStamp internally?Reasons: simplify use without RTOS.
The text was updated successfully, but these errors were encountered: