Dave Chapman | da8bff1 | 2008-10-12 16:46:01 +0000 | [diff] [blame^] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id:$ |
| 9 | * |
| 10 | * Copyright (C) 2008 by Rafaël Carré |
| 11 | * |
| 12 | * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing |
| 13 | * and the ipodlinux bootloader by Daniel Palffy and Bernard Leach |
| 14 | * |
| 15 | * This program is free software; you can redistribute it and/or |
| 16 | * modify it under the terms of the GNU General Public License |
| 17 | * as published by the Free Software Foundation; either version 2 |
| 18 | * of the License, or (at your option) any later version. |
| 19 | * |
| 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 21 | * KIND, either express or implied. |
| 22 | * |
| 23 | ****************************************************************************/ |
| 24 | |
| 25 | #include <stdio.h> |
| 26 | #include <system.h> |
| 27 | #include <inttypes.h> |
| 28 | #include "lcd.h" |
| 29 | #include "common.h" |
| 30 | #include "config.h" |
| 31 | |
| 32 | int show_logo(void); |
| 33 | void main(void) |
| 34 | { |
| 35 | lcd_init_device(); |
| 36 | lcd_clear_display(); |
| 37 | |
| 38 | lcd_update(); |
| 39 | |
| 40 | lcd_enable(true); |
| 41 | |
| 42 | show_logo(); |
| 43 | |
| 44 | #ifdef SANSA_CLIP |
| 45 | /* Use hardware scrolling */ |
| 46 | |
| 47 | lcd_write_command(0x26); /* scroll setup */ |
| 48 | lcd_write_command(0x01); /* columns scrolled per step */ |
| 49 | lcd_write_command(0x00); /* start page */ |
| 50 | lcd_write_command(0x00); /* steps freqency */ |
| 51 | lcd_write_command(0x07); /* end page (including) */ |
| 52 | |
| 53 | lcd_write_command(0x2F); /* start horizontal scrolling */ |
| 54 | #endif |
| 55 | |
| 56 | /* never returns */ |
| 57 | while(1) ; |
| 58 | } |