summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/rtc-imx233.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-07-02 00:36:21 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-07-02 00:45:00 +0200
commitd8024df1052966aa554424d88712244ae5978f2a (patch)
treec017a18d4570695d05c4afdee20697d1f30f8c59 /firmware/target/arm/imx233/rtc-imx233.h
parent277367373300bc4bb034f0ef57809989eeb2d233 (diff)
downloadrockbox-d8024df1052966aa554424d88712244ae5978f2a.tar.gz
rockbox-d8024df1052966aa554424d88712244ae5978f2a.tar.bz2
rockbox-d8024df1052966aa554424d88712244ae5978f2a.zip
imx233: implement alarm wake up
This adds the application part of alarm wake up. On some targets like the Fuze+, it will also require a bootloader change to make sure that the device doesn't power down on alarm wake up (for example on the Fuze+ the bootloader requires the power button to be hold sufficiently long, thus preventing alarm wake up to work) Change-Id: I5d01957852355fddbd48110d3d75a5533f07879e
Diffstat (limited to 'firmware/target/arm/imx233/rtc-imx233.h')
-rw-r--r--firmware/target/arm/imx233/rtc-imx233.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/rtc-imx233.h b/firmware/target/arm/imx233/rtc-imx233.h
index 3ad523bdbe..8a5f4d035c 100644
--- a/firmware/target/arm/imx233/rtc-imx233.h
+++ b/firmware/target/arm/imx233/rtc-imx233.h
@@ -33,6 +33,8 @@ struct imx233_rtc_info_t
{
uint32_t seconds;
uint32_t persistent[6];
+ uint32_t alarm;
+ bool alarm_en, alarm_wake_en, alarm_wake, alarm_irq;
};
static inline void imx233_rtc_init(void)
@@ -64,8 +66,14 @@ static inline void imx233_rtc_enable_msec_irq(bool enable)
BF_CLR(RTC_CTRL, ONEMSEC_IRQ_EN);
}
+static inline uint32_t imx233_rtc_read_alarm(void)
+{
+ return HW_RTC_ALARM;
+}
+
void imx233_rtc_write_seconds(uint32_t seconds);
void imx233_rtc_write_persistent(int idx, uint32_t val);
+void imx233_rtc_write_alarm(uint32_t seconds);
struct imx233_rtc_info_t imx233_rtc_get_info(void);