summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Dziok <b0hoon@o2.pl>2014-03-27 23:31:04 +0000
committerSzymon Dziok <b0hoon@o2.pl>2014-03-27 23:31:04 +0000
commit0eae33c60a6fb8bea24ec7bb867da8aba33ea04b (patch)
treeb732c479b935a228d1561b9e20e28cbe41addc5e
parent7b015f8681954d1c7c944597ca0ee75ef91ab284 (diff)
downloadrockbox-0eae33c60a6fb8bea24ec7bb867da8aba33ea04b.tar.gz
rockbox-0eae33c60a6fb8bea24ec7bb867da8aba33ea04b.zip
Sansa View: replace real bootloader with a simple test code.
After placing the firmware.mi4 file in the root dir of the player in UMS mode of the OF, Sansa should do stupid blinking with the backlight and buttonlight alternately. Recovering from this state is possible through the recovery mode (see Wiki), by putting an original copy of the firmware.mi4. Change-Id: Ia913442b97e8c405f55c4676b9a2bf0b1b1d05d6
-rw-r--r--bootloader/SOURCES2
-rw-r--r--bootloader/sansaview.c65
2 files changed, 67 insertions, 0 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES
index 4f3cd385f9..12347c57c9 100644
--- a/bootloader/SOURCES
+++ b/bootloader/SOURCES
@@ -21,6 +21,8 @@ main-e200r-installer.c
21#elif defined(SANSA_PP_ERASE) 21#elif defined(SANSA_PP_ERASE)
22main-ppsansawipe.c 22main-ppsansawipe.c
23fat32format.c 23fat32format.c
24#elif defined(SANSA_VIEW)
25sansaview.c
24#else 26#else
25show_logo.c 27show_logo.c
26main-pp.c 28main-pp.c
diff --git a/bootloader/sansaview.c b/bootloader/sansaview.c
new file mode 100644
index 0000000000..b1f0dbdfee
--- /dev/null
+++ b/bootloader/sansaview.c
@@ -0,0 +1,65 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2014 by Szymon Dziok
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22/*
23SANSA VIEW: TESTING CODE
24*/
25
26
27#include <stdlib.h>
28#include <stdio.h>
29#include <stdarg.h>
30#include <string.h>
31#include "config.h"
32#include "inttypes.h"
33#include "cpu.h"
34#include "system.h"
35#include "lcd.h"
36#include "kernel.h"
37#include "thread.h"
38#include "storage.h"
39#include "fat.h"
40#include "disk.h"
41#include "font.h"
42#include "backlight.h"
43#include "backlight-target.h"
44#include "button.h"
45#include "panic.h"
46#include "power.h"
47#include "file.h"
48#include "common.h"
49
50void main(void)
51{
52 system_init();
53 kernel_init();
54 disable_irq();
55
56 while(1)
57 {
58 _backlight_on();
59 _buttonlight_off();
60 sleep(HZ/4);
61 _backlight_off();
62 _buttonlight_on();
63 sleep(HZ/4);
64 }
65}