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

main: Run events at time intervals #486

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

crawfxrd
Copy link
Member

@crawfxrd crawfxrd commented Jul 13, 2024

Rewrite the main loop to run all its events at certain intervals of the systick instead of running most on every loop.

  • usbpd_event: Every 4 cycles -> 1ms
  • power_event: Every 4 cycles -> 1ms
  • kbscan_event: Every 4 cycles- > 5ms
  • lid_event: Every 4 cycles -> 500ms
  • board_event: Every cycle -> 1ms
  • kbc_event: Every cycle -> 1ms
  • pmc_event: Every cycle -> 1ms
  • smfi_event: Every cycle -> 1ms
  • battery_event: Every 1000ms

Ref: #209, Time-triggered architecture

Rewrite the main loop to run all its events at certain intervals of the
systick instead of running most on every loop.

Signed-off-by: Tim Crawford <[email protected]>
Signed-off-by: Tim Crawford <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant