Hopefully make the wps debug info more understandable... display tokens the same...
[kugel-rb.git] / bootloader / ipodnano2g.c
blobf6bfe148ac22c6fbee9f3433a97f416d4b74c133
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2009 by Dave Chapman
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #include <stdlib.h>
23 #include <stdio.h>
24 #include <stdarg.h>
25 #include <string.h>
27 #include "config.h"
29 #include "inttypes.h"
30 #include "cpu.h"
31 #include "system.h"
32 #include "lcd.h"
33 #include "i2c-s5l8700.h"
34 #include "kernel.h"
35 #include "thread.h"
36 #include "storage.h"
37 #include "fat.h"
38 #include "disk.h"
39 #include "font.h"
40 #include "backlight.h"
41 #include "backlight-target.h"
42 #include "button.h"
43 #include "panic.h"
44 #include "power.h"
45 #include "file.h"
46 #include "common.h"
48 char version[] = APPSVERSION;
50 /* Show the Rockbox logo - in show_logo.c */
51 extern int show_logo(void);
53 extern int line;
55 void main(void)
57 int i;
59 system_init();
60 i2c_init();
61 kernel_init();
63 enable_irq();
65 lcd_init();
67 _backlight_init();
69 lcd_puts_scroll(0,0,"+++ this is a very very long line to test scrolling. ---");
70 verbose = 0;
71 i = 0;
72 while (!button_hold()) {
73 line = 1;
75 printf("i=%d",i++);
76 printf("TBCNT: %08x",TBCNT);
77 printf("GPIO 0: %08x",PDAT0);
78 printf("GPIO 1: %08x",PDAT1);
79 printf("GPIO 2: %08x",PDAT2);
80 printf("GPIO 3: %08x",PDAT3);
81 printf("GPIO 4: %08x",PDAT4);
82 printf("GPIO 5: %08x",PDAT5);
83 printf("GPIO 6: %08x",PDAT6);
84 printf("GPIO 7: %08x",PDAT7);
85 printf("GPIO 10: %08x",PDAT10);
86 printf("GPIO 11: %08x",PDAT11);
87 printf("GPIO 13: %08x",PDAT13);
88 printf("GPIO 14: %08x",PDAT14);
90 lcd_update();
93 disable_irq();
95 /* Branch back to iBugger entry point */
96 asm volatile("ldr pc, =0x08640568");
98 /* We never reach here */
99 while(1);