summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-10-12 16:46:01 +0000
committerDave Chapman <dave@dchapman.com>2008-10-12 16:46:01 +0000
commitda8bff107e8ed6bf63cc005bfa6c90b12c8b4dd5 (patch)
tree13c81d9578d8ba3cda2d7c9d20e2a67ac8bee0d3 /bootloader
parent0f933f62101a8fe8bb841617217f7e866324820d (diff)
downloadrockbox-da8bff107e8ed6bf63cc005bfa6c90b12c8b4dd5.tar.gz
rockbox-da8bff107e8ed6bf63cc005bfa6c90b12c8b4dd5.zip
Commit FS#9467 - initial work on port to Sansa Clip by Rafaël Carré and François Dinel. A few cosmetic changes were made by me prior to committing: 1) TAB policing in button-clip.c; 2) Add François Dinel to CREDITS; 3) Add François Dinel as (C) holder in button-target.h (it was previously blank); 4) Add Rockbox header to bootloader/sansa_as3525.c with Rafaël Carré as (C) holder; 5) Change target_id to 50 (next available number) in tools/configure and fixed indentation; 6) Change MODEL_NUMBER in config-clip.h to 50 (next available number); 7) Remove unused in/out macros from system-target.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18782 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/SOURCES3
-rw-r--r--bootloader/sansa_as3525.c58
-rw-r--r--bootloader/show_logo.c6
3 files changed, 66 insertions, 1 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES
index c54d1e16b1..f0c98a8bd3 100644
--- a/bootloader/SOURCES
+++ b/bootloader/SOURCES
@@ -39,4 +39,7 @@ meizu_m3.c
ondavx747.c
#elif defined(CREATIVE_ZVx)
creativezvm.c
+#elif defined(HAVE_AS3525)
+sansa_as3525.c
+show_logo.c
#endif
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c
new file mode 100644
index 0000000000..297fb2e769
--- /dev/null
+++ b/bootloader/sansa_as3525.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id:$
+ *
+ * Copyright (C) 2008 by Rafaël Carré
+ *
+ * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
+ * and the ipodlinux bootloader by Daniel Palffy and Bernard Leach
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <system.h>
+#include <inttypes.h>
+#include "lcd.h"
+#include "common.h"
+#include "config.h"
+
+int show_logo(void);
+void main(void)
+{
+ lcd_init_device();
+ lcd_clear_display();
+
+ lcd_update();
+
+ lcd_enable(true);
+
+ show_logo();
+
+#ifdef SANSA_CLIP
+ /* Use hardware scrolling */
+
+ lcd_write_command(0x26); /* scroll setup */
+ lcd_write_command(0x01); /* columns scrolled per step */
+ lcd_write_command(0x00); /* start page */
+ lcd_write_command(0x00); /* steps freqency */
+ lcd_write_command(0x07); /* end page (including) */
+
+ lcd_write_command(0x2F); /* start horizontal scrolling */
+#endif
+
+ /* never returns */
+ while(1) ;
+}
diff --git a/bootloader/show_logo.c b/bootloader/show_logo.c
index b0cac3370f..b655e511cf 100644
--- a/bootloader/show_logo.c
+++ b/bootloader/show_logo.c
@@ -29,8 +29,12 @@
int show_logo( void )
{
char boot_version[32];
-
+
+#if LCD_WIDTH <= 128
+ snprintf(boot_version, sizeof(boot_version), "Boot %s", APPSVERSION);
+#else
snprintf(boot_version, sizeof(boot_version), "Boot Ver. %s", APPSVERSION);
+#endif
lcd_clear_display();
lcd_bitmap(rockboxlogo, 0, 10, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo);