Initial work on a port to the Logik DAX 1GB MP3/DAB player. The bootloader build...
[kugel-rb.git] / bootloader / telechips.c
blobc1dcda0dae76434b3d668c8772ca788b401b3689
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Dave Chapman
12 * Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #include "config.h"
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"
43 char version[] = APPSVERSION;
45 extern int line;
47 void* main(void)
49 unsigned short button;
50 int gpioa;
52 system_init();
53 adc_init();
54 lcd_init();
55 font_init();
57 __backlight_on();
59 while(1) {
60 line = 0;
61 printf("Hello World!");
63 gpioa = GPIOA;
64 printf("GPIOA: 0x%08x",gpioa);
66 button = adc_read(ADC_BUTTONS);
67 printf("ADC[0]: 0x%04x",button);
70 return 0;
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 */
75 void usb_acknowledge(void)
79 void usb_wait_for_disconnect(void)