diff options
author | James Buren <braewoods+rb@braewoods.net> | 2020-11-15 09:56:14 +0000 |
---|---|---|
committer | James Buren <braewoods+rb@braewoods.net> | 2020-11-15 10:11:56 +0000 |
commit | fc5c8192ffc8a10ce5f7ccbd96320dfbade1a8ef (patch) | |
tree | 427c066b1169d371885d8247c17dd824f0c4f632 /bootloader/iriver_h1x0.c | |
parent | 29a20bd20974780345197e4fe2be4b06ad08954b (diff) | |
download | rockbox-fc5c8192ffc8a10ce5f7ccbd96320dfbade1a8ef.tar.gz 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.c | 6 |
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) | |||
429 | 429 | ||
430 | adc_init(); | 430 | adc_init(); |
431 | button_init(); | 431 | button_init(); |
432 | sleep(HZ/50); /* Allow the button driver to check the buttons */ | ||
432 | 433 | ||
433 | /* Only check remote hold status if remote power button was actually used. */ | 434 | /* Only check remote hold status if remote power button was actually used. */ |
434 | if (rc_on_button) | 435 | if (rc_on_button) |
435 | { | 436 | { |
436 | lcd_remote_init(); | 437 | lcd_remote_init(); |
437 | 438 | ||
438 | /* Allow the button driver to check the buttons */ | ||
439 | sleep(HZ/50); | ||
440 | |||
441 | if (remote_button_hold()) | 439 | if (remote_button_hold()) |
442 | hold_status = true; | 440 | hold_status = true; |
443 | } | 441 | } |
@@ -476,8 +474,6 @@ void main(void) | |||
476 | printf("Rockbox boot loader"); | 474 | printf("Rockbox boot loader"); |
477 | printf("Version %s", rbversion); | 475 | printf("Version %s", rbversion); |
478 | 476 | ||
479 | /* No need to wait here more because lcd_init and others already do that. */ | ||
480 | // sleep(HZ/50); /* Allow the button driver to check the buttons */ | ||
481 | rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC) | 477 | rec_button = ((button_status() & BUTTON_REC) == BUTTON_REC) |
482 | || ((button_status() & BUTTON_RC_REC) == BUTTON_RC_REC); | 478 | || ((button_status() & BUTTON_RC_REC) == BUTTON_RC_REC); |
483 | 479 | ||