blob: b9975a97228c49823ea7132a749d245b6f3d8038 [file] [log] [blame]
Dave Chapmanda8bff12008-10-12 16:46:01 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
Dave Chapman08c41d42008-10-19 14:11:01 +00008 * $Id$
Dave Chapmanda8bff12008-10-12 16:46:01 +00009 *
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
32int show_logo(void);
33void main(void)
34{
35 lcd_init_device();
36 lcd_clear_display();
37
38 lcd_update();
39
Dave Chapman08c41d42008-10-19 14:11:01 +000040#ifdef HAVE_LCD_ENABLE
Dave Chapmanda8bff12008-10-12 16:46:01 +000041 lcd_enable(true);
Dave Chapman08c41d42008-10-19 14:11:01 +000042#endif
Dave Chapmanda8bff12008-10-12 16:46:01 +000043
44 show_logo();
45
46#ifdef SANSA_CLIP
47 /* Use hardware scrolling */
48
49 lcd_write_command(0x26); /* scroll setup */
50 lcd_write_command(0x01); /* columns scrolled per step */
51 lcd_write_command(0x00); /* start page */
52 lcd_write_command(0x00); /* steps freqency */
53 lcd_write_command(0x07); /* end page (including) */
54
55 lcd_write_command(0x2F); /* start horizontal scrolling */
56#endif
57
58 /* never returns */
59 while(1) ;
60}