summaryrefslogtreecommitdiffstats
path: root/bootloader/iriver_h1x0.c
diff options
context:
space:
mode:
authorJames Buren <braewoods+rb@braewoods.net>2020-11-15 09:56:14 +0000
committerJames Buren <braewoods+rb@braewoods.net>2020-11-15 10:11:56 +0000
commitfc5c8192ffc8a10ce5f7ccbd96320dfbade1a8ef (patch)
tree427c066b1169d371885d8247c17dd824f0c4f632 /bootloader/iriver_h1x0.c
parent29a20bd20974780345197e4fe2be4b06ad08954b (diff)
downloadrockbox-fc5c8192ffc8a10ce5f7ccbd96320dfbade1a8ef.tar.gz
rockbox-fc5c8192ffc8a10ce5f7ccbd96320dfbade1a8ef.tar.bz2
rockbox-fc5c8192ffc8a10ce5f7ccbd96320dfbade1a8ef.zip
h1x0/h300: fix h300 bootloader hold switch check
This fixes an early boot bug on the h300 where hold_status is read before it has a chance to properly check whether the hold switch is even active. This was accomplished by porting over the method the h1x0 uses to perform the same check. Change-Id: I04679d82f65a2edcbee4be9a146437c3988040a2
Diffstat (limited to 'bootloader/iriver_h1x0.c')
-rw-r--r--bootloader/iriver_h1x0.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/bootloader/iriver_h1x0.c b/bootloader/iriver_h1x0.c
index 7af0e86240..94ec6cb0fb 100644
--- a/bootloader/iriver_h1x0.c
+++ b/bootloader/iriver_h1x0.c
@@ -429,15 +429,13 @@ void main(void)
adc_init();
button_init();
+ sleep(HZ/50); /* Allow the button driver to check the buttons */
/* Only check remote hold status if remote power button was actually used. */
if (rc_on_button)
{
lcd_remote_init();
- /* Allow the button driver to check the buttons */
- sleep(HZ/50);
-
if (remote_button_hold())
hold_status = true;
}
@@ -476,8 +474,6 @@ void main(void)
printf("Rockbox boot loader");
printf("Version %s", rbversion);
- /* No need to wait here more because lcd_init and others already do that. */
- // sleep(HZ/50); /* Allow the button driver to check the buttons */
rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC)
|| ((button_status() & BUTTON_RC_REC) == BUTTON_RC_REC);