Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.5k
docs/library/machine.Timer: Explain the id parameter in more detail.#18367
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
As noted in discussion on PRmicropython#18263, the id parameter is optional on portsthat support virtual timers.Add some more general explanation of hardware vs virtual timers.This work was funded through GitHub Sponsors.Signed-off-by: Angus Gratton <angus@redyak.com.au>
@LucienMP Does this explanation make sense to you? I didn't change the signature for the constructor because there are still ports which don't support hardware timers, and on these ports the |
pyramids commentedNov 5, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Shouldn't "there are still ports whichdon't support hardware timers" be "there are still ports whichonly support hardware timers"? |
Summary
As noted in discussion on#18263, the
idparameter is optional on ports that support virtual timers.Explain this in the docs, and add some more general explanation of hardware vs virtual timers.
This work was funded through GitHub Sponsors.
Testing
Manually checked the ports for which are hardware-only and which are virtual-only:
Explained this in the docs by saying hardware timers are generally available, apart from the two exceptions, and that virtual timers are only available on some ports.