From f4c42213062170ddfcc706b3c5ed19f47517c253 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 26 Jan 2017 21:08:55 -0500 Subject: 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 --- firmware/target/arm/imx31/gigabeat-s/mc13783-target.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/target/arm/imx31/gigabeat-s/mc13783-target.h') 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 = MC13783_EVENT_VECTOR_TBL_START() /* ADC conversion complete */ MC13783_EVENT_VECTOR(ADCDONE, 0) +#if CONFIG_RTC + /* RTC tick */ + MC13783_EVENT_VECTOR(1HZ, 0) +#endif /* CONFIG_RTC */ /* Power button */ MC13783_EVENT_VECTOR(ONOFD1, MC13783_ONOFD1S) /* Main charger detection */ -- cgit v1.2.3