mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Disable bootloader messages in the H10 and Sansa bootloaders unless the PLAY (on H10) or RIGHT (on Sansa) button is being held. Messages are still displayed if an error occurs. This has already been implemented for iPod bootloaders, but still needs implementing for the other bootloaders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12742 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
62dbd97e90
commit
2370998a87
4 changed files with 61 additions and 20 deletions
|
@ -25,10 +25,13 @@
|
|||
#include <stdbool.h>
|
||||
#include "cpu.h"
|
||||
#include "common.h"
|
||||
#include "power.h"
|
||||
#include "kernel.h"
|
||||
|
||||
/* TODO: Other bootloaders need to be adjusted to set this variable to true
|
||||
on a button press - currently only the ipod version does. */
|
||||
#ifdef IPOD_ARCH
|
||||
on a button press - currently only the ipod, H10 and Sansa versions do. */
|
||||
#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || \
|
||||
defined(SANSA_E200)
|
||||
bool verbose = false;
|
||||
#else
|
||||
bool verbose = true;
|
||||
|
@ -99,6 +102,28 @@ char *strerror(int error)
|
|||
}
|
||||
}
|
||||
|
||||
void error(int errortype, int error)
|
||||
{
|
||||
switch(errortype)
|
||||
{
|
||||
case EATA:
|
||||
printf("ATA error: %d", error);
|
||||
break;
|
||||
|
||||
case EDISK:
|
||||
printf("No partition found");
|
||||
break;
|
||||
|
||||
case EBOOTFILE:
|
||||
printf(strerror(error));
|
||||
break;
|
||||
}
|
||||
|
||||
lcd_update();
|
||||
sleep(5*HZ);
|
||||
power_off();
|
||||
}
|
||||
|
||||
/* Load firmware image in a format created by tools/scramble */
|
||||
int load_firmware(unsigned char* buf, char* firmware, int buffer_size)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue