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

Add hal::soft::timer_spliter<N> #33

Open
kammce opened this issue Jun 9, 2024 · 1 comment
Open

Add hal::soft::timer_spliter<N> #33

kammce opened this issue Jun 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@kammce
Copy link
Member

kammce commented Jun 9, 2024

The idea of timer_spliter is to take a single timer and split it into multiple timers. It would take size_t template parameter which is used to create memory for N number of callbacks for each timer.

The timer spliter would have to manage associating scheduled timeouts with the time given and when an interrupt occurs will track down the associated scheduled callbacks and execute them then set the schedule to the next callback. This is effectively a form of a scheduler or event loop (see js).

@kammce kammce added the enhancement New feature or request label Jun 9, 2024
@kammce
Copy link
Member Author

kammce commented Jun 9, 2024

The motivation for this feature is when an device runs out of timers and can handle the overhead of using timer_spliter.

@kammce kammce transferred this issue from libhal/libhal-soft Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant