mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Fix bootloader red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25112 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
20980e6e72
commit
db569e6bbc
1 changed files with 13 additions and 3 deletions
|
|
@ -28,7 +28,9 @@
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include "sprintf.h"
|
#include "sprintf.h"
|
||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
|
#ifndef BOOTLOADER
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
|
#endif
|
||||||
#ifdef IPOD_NANO2G
|
#ifdef IPOD_NANO2G
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "pmu-target.h"
|
#include "pmu-target.h"
|
||||||
|
|
@ -51,8 +53,10 @@ bool __dbg_hw_info(void)
|
||||||
int line;
|
int line;
|
||||||
int i;
|
int i;
|
||||||
#ifdef IPOD_NANO2G
|
#ifdef IPOD_NANO2G
|
||||||
unsigned int state;
|
#ifndef BOOTLOADER
|
||||||
|
unsigned int state = 0;
|
||||||
const unsigned int max_states=2;
|
const unsigned int max_states=2;
|
||||||
|
#endif
|
||||||
int nand_bank_count;
|
int nand_bank_count;
|
||||||
struct storage_info info;
|
struct storage_info info;
|
||||||
const struct nand_device_info_type *nand_devicetype[4];
|
const struct nand_device_info_type *nand_devicetype[4];
|
||||||
|
|
@ -63,14 +67,14 @@ bool __dbg_hw_info(void)
|
||||||
nand_devicetype[i] = nand_get_device_type(i);
|
nand_devicetype[i] = nand_get_device_type(i);
|
||||||
if(nand_devicetype[i] != NULL) nand_bank_count++;
|
if(nand_devicetype[i] != NULL) nand_bank_count++;
|
||||||
}
|
}
|
||||||
state=0;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
state=0;
|
state=0;
|
||||||
|
#endif
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
@ -79,8 +83,10 @@ bool __dbg_hw_info(void)
|
||||||
/* _DEBUG_PRINTF statements can be added here to show debug info */
|
/* _DEBUG_PRINTF statements can be added here to show debug info */
|
||||||
#ifdef IPOD_NANO2G
|
#ifdef IPOD_NANO2G
|
||||||
|
|
||||||
|
#ifndef BOOTLOADER
|
||||||
if(state == 0)
|
if(state == 0)
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
_DEBUG_PRINTF("CPU:");
|
_DEBUG_PRINTF("CPU:");
|
||||||
_DEBUG_PRINTF("current_tick: %d", (unsigned int)current_tick);
|
_DEBUG_PRINTF("current_tick: %d", (unsigned int)current_tick);
|
||||||
line++;
|
line++;
|
||||||
|
|
@ -103,6 +109,7 @@ bool __dbg_hw_info(void)
|
||||||
_DEBUG_PRINTF("sectors: %d", info.num_sectors);
|
_DEBUG_PRINTF("sectors: %d", info.num_sectors);
|
||||||
_DEBUG_PRINTF("sector size: %d", info.sector_size);
|
_DEBUG_PRINTF("sector size: %d", info.sector_size);
|
||||||
_DEBUG_PRINTF("last disk activity: %d", (unsigned int)nand_last_disk_activity());
|
_DEBUG_PRINTF("last disk activity: %d", (unsigned int)nand_last_disk_activity());
|
||||||
|
#ifndef BOOTLOADER
|
||||||
}
|
}
|
||||||
else if(state==1)
|
else if(state==1)
|
||||||
{
|
{
|
||||||
|
|
@ -137,12 +144,14 @@ bool __dbg_hw_info(void)
|
||||||
{
|
{
|
||||||
state=0;
|
state=0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
_DEBUG_PRINTF("__dbg_hw_info");
|
_DEBUG_PRINTF("__dbg_hw_info");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
#ifndef BOOTLOADER
|
||||||
switch(get_action(CONTEXT_STD,HZ/20))
|
switch(get_action(CONTEXT_STD,HZ/20))
|
||||||
{
|
{
|
||||||
case ACTION_STD_PREV:
|
case ACTION_STD_PREV:
|
||||||
|
|
@ -160,6 +169,7 @@ bool __dbg_hw_info(void)
|
||||||
lcd_setfont(FONT_UI);
|
lcd_setfont(FONT_UI);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
lcd_setfont(FONT_UI);
|
lcd_setfont(FONT_UI);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue