mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
pcf56065: Fix a compile warning uncovered by GCC8
Basically, use '!' instead of '~' on bools. Change-Id: If0d94b294e69a939101e16808d4adc50a9fe1c81
This commit is contained in:
parent
b11777b06c
commit
65db4acabe
1 changed files with 3 additions and 4 deletions
|
@ -84,7 +84,7 @@ int rtc_write_datetime(const struct tm *tm)
|
||||||
* Checks the PCF interrupt 1 register bit 7 to see if an alarm interrupt has
|
* Checks the PCF interrupt 1 register bit 7 to see if an alarm interrupt has
|
||||||
* triggered since last we checked.
|
* triggered since last we checked.
|
||||||
*/
|
*/
|
||||||
bool rtc_check_alarm_flag(void)
|
bool rtc_check_alarm_flag(void)
|
||||||
{
|
{
|
||||||
return pcf50605_read(0x02) & 0x80;
|
return pcf50605_read(0x02) & 0x80;
|
||||||
}
|
}
|
||||||
|
@ -125,9 +125,9 @@ bool rtc_check_alarm_started(bool release_alarm)
|
||||||
static bool run_before = false, alarm_state;
|
static bool run_before = false, alarm_state;
|
||||||
bool rc;
|
bool rc;
|
||||||
|
|
||||||
if (run_before) {
|
if (run_before) {
|
||||||
rc = alarm_state;
|
rc = alarm_state;
|
||||||
alarm_state &= ~release_alarm;
|
alarm_state &= !release_alarm;
|
||||||
} else {
|
} else {
|
||||||
char rt[3], at[3];
|
char rt[3], at[3];
|
||||||
/* The Ipod bootloader seems to read (and thus clear) the PCF interrupt
|
/* The Ipod bootloader seems to read (and thus clear) the PCF interrupt
|
||||||
|
@ -165,4 +165,3 @@ void rtc_get_alarm(int *h, int *m)
|
||||||
*m = BCD2DEC(buf[0]);
|
*m = BCD2DEC(buf[0]);
|
||||||
*h = BCD2DEC(buf[1]);
|
*h = BCD2DEC(buf[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue