From ff17905d7ceece9d3a1ec2505b6e18dc7d29b34b Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 2 Mar 2007 11:28:23 +0000 Subject: H300 bootloader: (Work in progress) Boot Rockbox on RTC alarm, add charging screen, move to a separate source file, backlight is on during USB mode (again) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12546 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/main.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'bootloader/main.c') diff --git a/bootloader/main.c b/bootloader/main.c index 1b6ccc7aeb..a9411a766d 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -56,11 +56,6 @@ static bool recovery_mode = false; #endif -int usb_screen(void) -{ - return 0; -} - char version[] = APPSVERSION; /* Reset the cookie for the crt0 crash check */ @@ -434,9 +429,7 @@ void main(void) hold_status = true; } - /* Power on the hard drive early, to speed up the loading. - Some H300 don't like this, so we only do it for the H100 */ -#ifndef IRIVER_H300_SERIES + /* Power on the hard drive early, to speed up the loading. */ if (!hold_status # ifdef HAVE_EEPROM_SETTINGS && !recovery_mode @@ -450,7 +443,6 @@ void main(void) if (!hold_status && !usb_detect() && !recovery_mode) try_flashboot(); # endif -#endif backlight_init(); #ifdef HAVE_UDA1380 @@ -596,3 +588,22 @@ void main(void) void screen_dump(void) { } + +int usb_screen(void) +{ + return 0; +} + +unsigned short *bidi_l2v(const unsigned char *str, int orientation) +{ + static unsigned short utf16_buf[SCROLL_LINE_SIZE]; + unsigned short *target; + (void)orientation; + + target = utf16_buf; + + while (*str) + str = utf8decode(str, target++); + *target = 0; + return utf16_buf; +} -- cgit v1.2.3