Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
7d849b41
Verified
Commit
7d849b41
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
fix(rtc): Trigger immediately if alarm is scheduled in the past
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
886443ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#2102
passed
5 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
epicardium/modules/rtc.c
+9
-0
9 additions, 0 deletions
epicardium/modules/rtc.c
with
9 additions
and
0 deletions
epicardium/modules/rtc.c
+
9
−
0
View file @
7d849b41
...
...
@@ -58,6 +58,15 @@ int epic_rtc_schedule_alarm(uint32_t timestamp)
{
int
res
;
/*
* Check if the timestamp lies in the past and if so, trigger
* immediately.
*/
if
(
epic_rtc_get_seconds
()
>=
timestamp
)
{
api_interrupt_trigger
(
EPIC_INT_RTC_ALARM
);
return
0
;
}
NVIC_EnableIRQ
(
RTC_IRQn
);
while
((
res
=
RTC_SetTimeofdayAlarm
(
MXC_RTC
,
timestamp
))
==
E_BUSY
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment