em-foundation / zigem-dev

See https://blog.zigem.tech to learn more.
MIT License
0 stars 0 forks source link

OneShot{Milli,Micro}I #17

Open biosbob opened 5 hours ago

biosbob commented 5 hours ago

Milestone:

The OneShot abstraction needs to include usecs as well as msecs. This is particularly important for Poller.pause(), where need an "inline sleep" for (say) 50us....

With no urgent need to preserve backward compatibility, we have several alternative ways to expose the APIs:

In practice, a usec-resolution timer with 24-bits of range can handle intervals up to 16 seconds – more than enough time for our intended use. Legacy 8-bit/16-bit MCUs would prefer having two abstractions/methods for flexibility, however.

biosbob commented 5 hours ago

the second alternative seems like the best balance.... i work towards a PR for review