-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Using the RTC update for the 1s periodic event #309
Comments
@jakkra maybe we can replace the 10 seconds timer too? |
@Kampi make sure both 1s and 10s are still executed in the system workqueue context. i.e. switch the delayed work to just a k_work when the RTC ISR happens. Drawback of using it also for 10s, is that we still need to wake up every 1s, even if there are none listening on 1s. Lower accuracy on 10s is fine IMO. |
@jakkra good point. We also can't use the alarm for this because we need the alarm for something like a stopwatch. So let's start with 1s first. Btw. the RTC callbacks are already handled in the worker context :) |
@jakkra the question how to add this to the code. We can add only one update callback to the driver. So we need a bit of gluecode to handle more than one callback or I move the code from |
Just from the top of my head how about register the rtc callback in zsw_clock and then add a way to register a tick callback to zsw_clock? Which then |
That´s what I mean with gluecode to add more than one callback :) |
Don't have a better suggestion :/ |
Replace the timer for the 1s periodic callback with the RTC update function when using rev 5
The text was updated successfully, but these errors were encountered: