diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2022-11-27 01:08:11 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2022-11-27 01:20:03 -0500 |
commit | 65db4acabefdc9cbccc247d598b7416be4431542 (patch) | |
tree | c63ed64314df886a4023f7c43205abf3f5b0d142 | |
parent | b11777b06cc33724bd82f5a63c6ed64ca475af0b (diff) | |
download | rockbox-65db4acabefdc9cbccc247d598b7416be4431542.tar.gz rockbox-65db4acabefdc9cbccc247d598b7416be4431542.zip |
pcf56065: Fix a compile warning uncovered by GCC8
Basically, use '!' instead of '~' on bools.
Change-Id: If0d94b294e69a939101e16808d4adc50a9fe1c81
-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 | |||