diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2017-01-26 21:08:55 -0500 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2017-11-21 07:52:02 -0500 |
commit | f4c42213062170ddfcc706b3c5ed19f47517c253 (patch) | |
tree | 65f8058970e97d939660cf1e39f844a06df66f84 /firmware/target/arm/as3525/rtc-target.h | |
parent | 12bc24adbf919dc945928b2dcda74d51d33708f7 (diff) | |
download | rockbox-f4c42213062170ddfcc706b3c5ed19f47517c253.tar.gz rockbox-f4c42213062170ddfcc706b3c5ed19f47517c253.zip |
Convert i.MX31 and AMS target to use RTC interrupt
Instead of checking ticks, set a sticky dirty flag that indicates
that the RTC needs to be read. This gives a timely update and more
accurate readout without actually reading the RTC until it changes.
The implementation should atomically read the flag and clear it.
Setting the flag would typically happen in an RTC tick ISR.
Change-Id: I6fd325f22845029a485c502c884812d3676026ea
Diffstat (limited to 'firmware/target/arm/as3525/rtc-target.h')
-rw-r--r-- | firmware/target/arm/as3525/rtc-target.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/rtc-target.h b/firmware/target/arm/as3525/rtc-target.h new file mode 100644 index 0000000000..900aa357d0 --- /dev/null +++ b/firmware/target/arm/as3525/rtc-target.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2017 by Michael Sevakis | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef RTC_TARGET_H | ||
22 | #define RTC_TARGET_H | ||
23 | |||
24 | bool ascodec_rtc_dirty(void); | ||
25 | #define rtc_dirty ascodec_rtc_dirty | ||
26 | |||
27 | #endif /* RTC_TARGET_H */ | ||