summaryrefslogtreecommitdiff
path: root/firmware/drivers/rtc/rtc_m41st84w.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/rtc/rtc_m41st84w.c')
-rw-r--r--firmware/drivers/rtc/rtc_m41st84w.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/drivers/rtc/rtc_m41st84w.c b/firmware/drivers/rtc/rtc_m41st84w.c
index 951091c6f2..5374f66f24 100644
--- a/firmware/drivers/rtc/rtc_m41st84w.c
+++ b/firmware/drivers/rtc/rtc_m41st84w.c
@@ -26,8 +26,8 @@
26#include <stdbool.h> 26#include <stdbool.h>
27 27
28#define RTC_ADR 0xd0 28#define RTC_ADR 0xd0
29#define RTC_DEV_WRITE (RTC_ADR | 0x00) 29#define RTC_DEV_WRITE (RTC_ADR | 0x00)
30#define RTC_DEV_READ (RTC_ADR | 0x01) 30#define RTC_DEV_READ (RTC_ADR | 0x01)
31 31
32void rtc_init(void) 32void rtc_init(void)
33{ 33{
@@ -159,8 +159,8 @@ bool rtc_enable_alarm(bool enable)
159 { 159 {
160 data &= 0x5f; /* turn bit d7=AFE and d5=ABE off */ 160 data &= 0x5f; /* turn bit d7=AFE and d5=ABE off */
161 rtc_write(0x0a, data); 161 rtc_write(0x0a, data);
162 sleep(HZ / 10); 162 sleep(HZ / 10);
163 rtc_check_alarm_flag(); 163 rtc_check_alarm_flag();
164 data |= 0xa0; /* turn bit d7=AFE and d5=ABE on */ 164 data |= 0xa0; /* turn bit d7=AFE and d5=ABE on */
165 rtc_write(0x0a, data); 165 rtc_write(0x0a, data);
166 } 166 }