diff options
-rw-r--r-- | firmware/drivers/rtc/rtc_pcf50605.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/drivers/rtc/rtc_pcf50605.c b/firmware/drivers/rtc/rtc_pcf50605.c index 42ea15ff2e..4d2560284c 100644 --- a/firmware/drivers/rtc/rtc_pcf50605.c +++ b/firmware/drivers/rtc/rtc_pcf50605.c | |||
@@ -84,7 +84,7 @@ int rtc_write_datetime(const struct tm *tm) | |||
84 | * Checks the PCF interrupt 1 register bit 7 to see if an alarm interrupt has | 84 | * Checks the PCF interrupt 1 register bit 7 to see if an alarm interrupt has |
85 | * triggered since last we checked. | 85 | * triggered since last we checked. |
86 | */ | 86 | */ |
87 | bool rtc_check_alarm_flag(void) | 87 | bool rtc_check_alarm_flag(void) |
88 | { | 88 | { |
89 | return pcf50605_read(0x02) & 0x80; | 89 | return pcf50605_read(0x02) & 0x80; |
90 | } | 90 | } |
@@ -125,9 +125,9 @@ bool rtc_check_alarm_started(bool release_alarm) | |||
125 | static bool run_before = false, alarm_state; | 125 | static bool run_before = false, alarm_state; |
126 | bool rc; | 126 | bool rc; |
127 | 127 | ||
128 | if (run_before) { | 128 | if (run_before) { |
129 | rc = alarm_state; | 129 | rc = alarm_state; |
130 | alarm_state &= ~release_alarm; | 130 | alarm_state &= !release_alarm; |
131 | } else { | 131 | } else { |
132 | char rt[3], at[3]; | 132 | char rt[3], at[3]; |
133 | /* The Ipod bootloader seems to read (and thus clear) the PCF interrupt | 133 | /* The Ipod bootloader seems to read (and thus clear) the PCF interrupt |
@@ -165,4 +165,3 @@ void rtc_get_alarm(int *h, int *m) | |||
165 | *m = BCD2DEC(buf[0]); | 165 | *m = BCD2DEC(buf[0]); |
166 | *h = BCD2DEC(buf[1]); | 166 | *h = BCD2DEC(buf[1]); |
167 | } | 167 | } |
168 | |||