summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iriver
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-13 14:43:29 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-13 15:48:31 -0400
commitb94db707fb7a8ace5c8821ea47d85ec48ca48e26 (patch)
tree9b0128bd96c8765a8e7abdbe9062e6bcd397da69 /firmware/target/coldfire/iriver
parent431caa4311c13a0937ae60ac225e780c0a0670b9 (diff)
Fix more warnings.
Change-Id: Ib3a9fc622a46b1fc72e94dcbc6d29d2e430cd81b
Diffstat (limited to 'firmware/target/coldfire/iriver')
-rw-r--r--firmware/target/coldfire/iriver/h100/button-h100.c11
-rw-r--r--firmware/target/coldfire/iriver/h300/button-h300.c9
2 files changed, 15 insertions, 5 deletions
diff --git a/firmware/target/coldfire/iriver/h100/button-h100.c b/firmware/target/coldfire/iriver/h100/button-h100.c
index dbaefdcf2a..63f772b65e 100644
--- a/firmware/target/coldfire/iriver/h100/button-h100.c
+++ b/firmware/target/coldfire/iriver/h100/button-h100.c
@@ -40,7 +40,7 @@ bool button_hold(void)
}
static bool remote_button_hold_only(void)
-{
+{
if(remote_type() == REMOTETYPE_H300_NONLCD)
return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */
else
@@ -68,14 +68,17 @@ int button_read_device(void)
static bool remote_hold_button = false;
static int prev_data = 0xff;
static int last_valid = 0xff;
+#ifndef BOOTLOADER
bool hold_button_old;
bool remote_hold_button_old;
+#endif
/* normal buttons */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
-
-
+
#ifndef BOOTLOADER
if (hold_button != hold_button_old)
backlight_hold_changed(hold_button);
@@ -120,7 +123,9 @@ int button_read_device(void)
}
/* remote buttons */
+#ifndef BOOTLOADER
remote_hold_button_old = remote_hold_button;
+#endif
remote_hold_button = remote_button_hold_only();
#ifndef BOOTLOADER
diff --git a/firmware/target/coldfire/iriver/h300/button-h300.c b/firmware/target/coldfire/iriver/h300/button-h300.c
index 74c14fb144..437c9fd2d3 100644
--- a/firmware/target/coldfire/iriver/h300/button-h300.c
+++ b/firmware/target/coldfire/iriver/h300/button-h300.c
@@ -84,14 +84,17 @@ int button_read_device(void)
static bool remote_hold_button = false;
static int prev_data = 0xff;
static int last_valid = 0xff;
+#ifndef BOOTLOADER
bool hold_button_old;
bool remote_hold_button_old;
+#endif
/* normal buttons */
+#ifndef BOOTLOADER
hold_button_old = hold_button;
+#endif
hold_button = button_hold();
-
-
+
#ifndef BOOTLOADER
if (hold_button != hold_button_old)
backlight_hold_changed(hold_button);
@@ -130,7 +133,9 @@ int button_read_device(void)
}
/* remote buttons */
+#ifndef BOOTLOADER
remote_hold_button_old = remote_hold_button;
+#endif
remote_hold_button = remote_button_hold_only();
#ifndef BOOTLOADER