forked from len0rd/rockbox
UIE(), panicf(): Make reboot with ON react immediately on targets with real LED (archos recorders, player).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11154 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
994257ec6c
commit
f4e7759625
2 changed files with 16 additions and 12 deletions
|
@ -40,7 +40,8 @@ void panicf( const char *fmt, ...)
|
||||||
|
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
#if CONFIG_LED == LED_REAL
|
#if CONFIG_LED == LED_REAL
|
||||||
bool state = true;
|
bool state = false;
|
||||||
|
int i = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Disable interrupts */
|
/* Disable interrupts */
|
||||||
|
@ -90,11 +91,12 @@ void panicf( const char *fmt, ...)
|
||||||
{
|
{
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
#if CONFIG_LED == LED_REAL
|
#if CONFIG_LED == LED_REAL
|
||||||
volatile long i;
|
if (--i <= 0)
|
||||||
led (state);
|
{
|
||||||
state = !state;
|
state = !state;
|
||||||
|
led(state);
|
||||||
for (i = 0; i < 240000; ++i);
|
i = 240000;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* try to restart firmware if ON is pressed */
|
/* try to restart firmware if ON is pressed */
|
||||||
|
|
|
@ -1017,7 +1017,8 @@ void UIE (unsigned int pc) __attribute__((section(".text")));
|
||||||
void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
|
void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
|
||||||
{
|
{
|
||||||
#if CONFIG_LED == LED_REAL
|
#if CONFIG_LED == LED_REAL
|
||||||
bool state = true;
|
bool state = false;
|
||||||
|
int i = 0;
|
||||||
#endif
|
#endif
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
char str[32];
|
char str[32];
|
||||||
|
@ -1043,11 +1044,12 @@ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
#if CONFIG_LED == LED_REAL
|
#if CONFIG_LED == LED_REAL
|
||||||
volatile int i;
|
if (--i <= 0)
|
||||||
led (state);
|
{
|
||||||
state = !state;
|
state = !state;
|
||||||
|
led(state);
|
||||||
for (i = 0; i < 240000; ++i);
|
i = 240000;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* try to restart firmware if ON is pressed */
|
/* try to restart firmware if ON is pressed */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue