diff options
author | Dave Chapman <dave@dchapman.com> | 2009-07-18 11:31:19 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2009-07-18 11:31:19 +0000 |
commit | 386503502b2794021f5de431a32bad41dfe5c2d9 (patch) | |
tree | 19e3b216233cfc7c529633458f2aa80a157e81a9 /bootloader/ipodnano2g.c | |
parent | d58e3584772189715f54b4035cd13eac4270058e (diff) | |
download | rockbox-386503502b2794021f5de431a32bad41dfe5c2d9.tar.gz rockbox-386503502b2794021f5de431a32bad41dfe5c2d9.zip |
Various Nano2g changes - enable the rest of crt0.S (including clock setup) and make the nano2g bootloader do something useful (displaying gpio ports). Also add checks for the fifo-full condition in the LCD driver - required after enabling all the crt0.S inits
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21948 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/ipodnano2g.c')
-rw-r--r-- | bootloader/ipodnano2g.c | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/bootloader/ipodnano2g.c b/bootloader/ipodnano2g.c index e8e8e2e1a4..f6bfe148ac 100644 --- a/bootloader/ipodnano2g.c +++ b/bootloader/ipodnano2g.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "cpu.h" | 30 | #include "cpu.h" |
31 | #include "system.h" | 31 | #include "system.h" |
32 | #include "lcd.h" | 32 | #include "lcd.h" |
33 | #include "i2c-s5l8700.h" | ||
33 | #include "kernel.h" | 34 | #include "kernel.h" |
34 | #include "thread.h" | 35 | #include "thread.h" |
35 | #include "storage.h" | 36 | #include "storage.h" |
@@ -49,13 +50,51 @@ char version[] = APPSVERSION; | |||
49 | /* Show the Rockbox logo - in show_logo.c */ | 50 | /* Show the Rockbox logo - in show_logo.c */ |
50 | extern int show_logo(void); | 51 | extern int show_logo(void); |
51 | 52 | ||
53 | extern int line; | ||
54 | |||
52 | void main(void) | 55 | void main(void) |
53 | { | 56 | { |
57 | int i; | ||
58 | |||
59 | system_init(); | ||
60 | i2c_init(); | ||
61 | kernel_init(); | ||
62 | |||
63 | enable_irq(); | ||
64 | |||
54 | lcd_init(); | 65 | lcd_init(); |
55 | 66 | ||
56 | show_logo(); | 67 | _backlight_init(); |
68 | |||
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; | ||
57 | 74 | ||
58 | /* Do nothing... */ | 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); | ||
89 | |||
90 | lcd_update(); | ||
91 | } | ||
92 | |||
93 | disable_irq(); | ||
94 | |||
95 | /* Branch back to iBugger entry point */ | ||
96 | asm volatile("ldr pc, =0x08640568"); | ||
97 | |||
98 | /* We never reach here */ | ||
59 | while(1); | 99 | while(1); |
60 | } | 100 | } |
61 | |||