From 386503502b2794021f5de431a32bad41dfe5c2d9 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 18 Jul 2009 11:31:19 +0000 Subject: 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 --- bootloader/ipodnano2g.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'bootloader/ipodnano2g.c') 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 @@ #include "cpu.h" #include "system.h" #include "lcd.h" +#include "i2c-s5l8700.h" #include "kernel.h" #include "thread.h" #include "storage.h" @@ -49,13 +50,51 @@ char version[] = APPSVERSION; /* Show the Rockbox logo - in show_logo.c */ extern int show_logo(void); +extern int line; + void main(void) { + int i; + + system_init(); + i2c_init(); + kernel_init(); + + enable_irq(); + lcd_init(); - show_logo(); + _backlight_init(); + + lcd_puts_scroll(0,0,"+++ this is a very very long line to test scrolling. ---"); + verbose = 0; + i = 0; + while (!button_hold()) { + line = 1; - /* Do nothing... */ + printf("i=%d",i++); + printf("TBCNT: %08x",TBCNT); + printf("GPIO 0: %08x",PDAT0); + printf("GPIO 1: %08x",PDAT1); + printf("GPIO 2: %08x",PDAT2); + printf("GPIO 3: %08x",PDAT3); + printf("GPIO 4: %08x",PDAT4); + printf("GPIO 5: %08x",PDAT5); + printf("GPIO 6: %08x",PDAT6); + printf("GPIO 7: %08x",PDAT7); + printf("GPIO 10: %08x",PDAT10); + printf("GPIO 11: %08x",PDAT11); + printf("GPIO 13: %08x",PDAT13); + printf("GPIO 14: %08x",PDAT14); + + lcd_update(); + } + + disable_irq(); + + /* Branch back to iBugger entry point */ + asm volatile("ldr pc, =0x08640568"); + + /* We never reach here */ while(1); } - -- cgit v1.2.3