-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Significant rewrite. Switch from struct to int64. Add RTC sync suppor…
…t. Untested.
- Loading branch information
Showing
10 changed files
with
376 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type": "library", "name": "ebs-time", "version": "9.9.9", "spec": {"owner": "chintal", "id": 17237, "name": "ebs-time", "requirements": null, "uri": null}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
|
||
#include <hal/uc/rtc.h> | ||
#include "sync.h" | ||
|
||
tm_real_t rtc_buffer; | ||
|
||
|
||
void tm_sync_rtc_wcb(void){ | ||
; | ||
} | ||
|
||
uint8_t tm_sync_current_to_rtc(void){ | ||
critical_enter(); | ||
tm_rtime_from_stime((tm_system_t *)&tm_current, &rtc_buffer); | ||
critical_exit(); | ||
return rtc_write(&rtc_buffer, &tm_sync_rtc_wcb); | ||
} | ||
|
||
void tm_sync_rtc_rcb(void){ | ||
critical_enter(); | ||
tm_stime_from_rtime(&rtc_buffer, (tm_system_t *)&tm_current); | ||
critical_exit(); | ||
} | ||
|
||
uint8_t tm_sync_current_from_rtc(void){ | ||
return rtc_read(&rtc_buffer, &tm_sync_rtc_rcb); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.