From da8bff107e8ed6bf63cc005bfa6c90b12c8b4dd5 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sun, 12 Oct 2008 16:46:01 +0000 Subject: =?UTF-8?q?Commit=20FS#9467=20-=20initial=20work=20on=20port=20to?= =?UTF-8?q?=20Sansa=20Clip=20by=20Rafa=C3=ABl=20Carr=C3=A9=20and=20Fran?= =?UTF-8?q?=C3=A7ois=20Dinel.=20=20A=20few=20cosmetic=20changes=20were=20m?= =?UTF-8?q?ade=20by=20me=20prior=20to=20committing:=201)=20TAB=20policing?= =?UTF-8?q?=20in=20button-clip.c;=202)=20Add=20Fran=C3=A7ois=20Dinel=20to?= =?UTF-8?q?=20CREDITS;=203)=20Add=20Fran=C3=A7ois=20Dinel=20as=20(C)=20hol?= =?UTF-8?q?der=20in=20button-target.h=20(it=20was=20previously=20blank);?= =?UTF-8?q?=204)=20Add=20Rockbox=20header=20to=20bootloader/sansa=5Fas3525?= =?UTF-8?q?.c=20with=20Rafa=C3=ABl=20Carr=C3=A9=20as=20(C)=20holder;=205)?= =?UTF-8?q?=20Change=20target=5Fid=20to=2050=20(next=20available=20number)?= =?UTF-8?q?=20in=20tools/configure=20and=20fixed=20indentation;=206)=20Cha?= =?UTF-8?q?nge=20MODEL=5FNUMBER=20in=20config-clip.h=20to=2050=20(next=20a?= =?UTF-8?q?vailable=20number);=207)=20Remove=20unused=20in/out=20macros=20?= =?UTF-8?q?from=20system-target.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18782 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/SOURCES | 3 +++ bootloader/sansa_as3525.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++ bootloader/show_logo.c | 6 ++++- 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 bootloader/sansa_as3525.c (limited to 'bootloader') diff --git a/bootloader/SOURCES b/bootloader/SOURCES index c54d1e1..f0c98a8 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 0000000..297fb2e --- /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 +#include +#include +#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 b0cac33..b655e51 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); -- cgit v1.1