Skip to content
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

Delay function #189

Open
sy2002 opened this issue Nov 11, 2020 · 0 comments
Open

Delay function #189

sy2002 opened this issue Nov 11, 2020 · 0 comments
Assignees
Labels

Comments

@sy2002
Copy link
Owner

sy2002 commented Nov 11, 2020

  • Add to the Monitor OS a delay function that takes a 32bit value in R8/R9 and that then uses the cycle counter to syncroneously wait the given amount of microseconds. Probably the "misc" library is the right place to add this functionality.

  • The cycle counter is activated by the monitor by default when starting up. So delay can rely on it. In case it is not active and delay is called: Ponder over the question if in such a case the delay function should activate the cycle counter (and deactivsate afterwards) because otherwise delay would wait forever.

  • Make sure to publish this function also for being used in C via qmon.h and the qmon library.

  • Do not use hard coded values for the CPU speed but use the constants that also power SYSINFO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant