summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2009-07-18 11:31:19 +0000
committerDave Chapman <dave@dchapman.com>2009-07-18 11:31:19 +0000
commit386503502b2794021f5de431a32bad41dfe5c2d9 (patch)
tree19e3b216233cfc7c529633458f2aa80a157e81a9 /bootloader
parentd58e3584772189715f54b4035cd13eac4270058e (diff)
downloadrockbox-386503502b2794021f5de431a32bad41dfe5c2d9.tar.gz
rockbox-386503502b2794021f5de431a32bad41dfe5c2d9.tar.bz2
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')
-rw-r--r--bootloader/ipodnano2g.c45
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 @@
#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);
}
-