blob: c1dcda0dae76434b3d668c8772ca788b401b3689 [file] [log] [blame]
Dave Chapman28f6ae42007-10-28 11:08:10 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Dave Chapman
11 *
12 * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
13 *
14 * All files in this archive are subject to the GNU General Public License.
15 * See the file COPYING in the source tree root for full license agreement.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include "config.h"
22
23#include <stdlib.h>
24#include <stdio.h>
25#include <string.h>
26#include "cpu.h"
27#include "system.h"
28#include "lcd.h"
29#include "kernel.h"
30#include "thread.h"
31#include "ata.h"
32#include "fat.h"
33#include "disk.h"
34#include "font.h"
35#include "adc.h"
36#include "adc-target.h"
37#include "backlight-target.h"
38#include "panic.h"
39#include "power.h"
40#include "file.h"
41#include "common.h"
42
43char version[] = APPSVERSION;
44
45extern int line;
46
47void* main(void)
48{
49 unsigned short button;
50 int gpioa;
51
52 system_init();
53 adc_init();
54 lcd_init();
55 font_init();
56
57 __backlight_on();
58
59 while(1) {
60 line = 0;
61 printf("Hello World!");
62
63 gpioa = GPIOA;
64 printf("GPIOA: 0x%08x",gpioa);
65
66 button = adc_read(ADC_BUTTONS);
67 printf("ADC[0]: 0x%04x",button);
68 }
69
70 return 0;
71}
72
73/* These functions are present in the firmware library, but we reimplement
74 them here because the originals do a lot more than we want */
75void usb_acknowledge(void)
76{
77}
78
79void usb_wait_for_disconnect(void)
80{
81}