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/imx31/gigabeat-s | |
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/imx31/gigabeat-s')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/mc13783-target.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/mc13783-target.h b/firmware/target/arm/imx31/gigabeat-s/mc13783-target.h index 179c65cad6..4bb148e36c 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mc13783-target.h +++ b/firmware/target/arm/imx31/gigabeat-s/mc13783-target.h | |||
@@ -46,6 +46,10 @@ static struct spi_node mc13783_spi = | |||
46 | MC13783_EVENT_VECTOR_TBL_START() | 46 | MC13783_EVENT_VECTOR_TBL_START() |
47 | /* ADC conversion complete */ | 47 | /* ADC conversion complete */ |
48 | MC13783_EVENT_VECTOR(ADCDONE, 0) | 48 | MC13783_EVENT_VECTOR(ADCDONE, 0) |
49 | #if CONFIG_RTC | ||
50 | /* RTC tick */ | ||
51 | MC13783_EVENT_VECTOR(1HZ, 0) | ||
52 | #endif /* CONFIG_RTC */ | ||
49 | /* Power button */ | 53 | /* Power button */ |
50 | MC13783_EVENT_VECTOR(ONOFD1, MC13783_ONOFD1S) | 54 | MC13783_EVENT_VECTOR(ONOFD1, MC13783_ONOFD1S) |
51 | /* Main charger detection */ | 55 | /* Main charger detection */ |