summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-09-25 14:11:56 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-09-25 14:31:39 +0200
commit7e03dbbf941a7f18f7dc32980e406adfb0a1f288 (patch)
treed59b9c80f2badc3b87028405d7b02d24ca295159 /bootloader
parentf67d9bd14f3fe7a18cb0fba2d233e66086961cf3 (diff)
downloadrockbox-7e03dbbf941a7f18f7dc32980e406adfb0a1f288.tar.gz
rockbox-7e03dbbf941a7f18f7dc32980e406adfb0a1f288.tar.bz2
rockbox-7e03dbbf941a7f18f7dc32980e406adfb0a1f288.zip
imx233: shorten bootloader messages when screen is small
Change-Id: I403a76277e756cf06b4dca4906940d5fbf32d763
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/imx233.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/bootloader/imx233.c b/bootloader/imx233.c
index abb9df833b..ebd67cea6c 100644
--- a/bootloader/imx233.c
+++ b/bootloader/imx233.c
@@ -50,6 +50,8 @@
extern char loadaddress[];
extern char loadaddressend[];
+#define MSG(width, short, long) (LCD_WIDTH < (width) ? short : long)
+
#ifdef HAVE_BOOTLOADER_USB_MODE
static void usb_mode(int connect_timeout)
{
@@ -98,7 +100,7 @@ static void usb_mode(int connect_timeout)
if(button == SYS_USB_DISCONNECTED)
break;
struct imx233_powermgmt_info_t info = imx233_powermgmt_get_info();
- lcd_putsf(0, 7, "Charging status: %s",
+ lcd_putsf(0, 7, "%s: %s", MSG(240, "Status", "Charging status"),
info.state == CHARGE_STATE_DISABLED ? "disabled" :
info.state == CHARGE_STATE_ERROR ? "error" :
info.state == DISCHARGING ? "discharging" :
@@ -106,11 +108,11 @@ static void usb_mode(int connect_timeout)
info.state == TOPOFF ? "topoff" :
info.state == CHARGING ? "charging" : "<unknown>");
lcd_putsf(0, 8, "Battery: %d%% (%d mV)", battery_level(), battery_voltage());
- lcd_putsf(0, 9, "Die temp: %d°C [%d, %d]",
+ lcd_putsf(0, 9, "%s: %d 'C [%d, %d]", MSG(240, "Die", "Die temp"),
adc_read(ADC_DIE_TEMP), IMX233_DIE_TEMP_HIGH,
IMX233_DIE_TEMP_LOW);
#ifdef ADC_BATT_TEMP
- lcd_putsf(0, 10, "Batt temp: %d [%d, %d]",
+ lcd_putsf(0, 10, "%s: %d 'C [%d, %d]", MSG(240, "Batt", "Batt temp"),
adc_read(ADC_BATT_TEMP), IMX233_BATT_TEMP_HIGH,
IMX233_BATT_TEMP_LOW);
#endif
@@ -150,15 +152,16 @@ void main(uint32_t arg, uint32_t addr)
button_init();
- printf("Boot version: %s", RBVERSION);
- printf("arg=%x addr=%x", arg, addr);
+ printf("%s: %s", MSG(240, "Ver", "Boot version"), RBVERSION);
+ printf("%s: %x ", MSG(240, "Arg", "Boot arg"), arg);
+ printf("%s: %x", MSG(240, "Addr", "Boot addr"), addr);
#if IMX233_SUBTARGET >= 3780
- printf("power up source: %x", BF_RD(POWER_STS, PWRUP_SOURCE));
+ printf("Power up source: %x", BF_RD(POWER_STS, PWRUP_SOURCE));
#endif
if(arg == 0xfee1dead)
{
- printf("Disable partitions window.");
+ printf("%s", MSG(240, "Disable window", "Disable partitions window"));
imx233_partitions_enable_window(false);
}