summaryrefslogtreecommitdiffstats
path: root/bootloader/mrobe500.c
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2007-09-23 23:08:39 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2007-09-23 23:08:39 +0000
commit9ac9cc6024271f806af23a84903d809eb145dc60 (patch)
tree66ff450d331c4dfae8758281a7faa47ffd2f752f /bootloader/mrobe500.c
parentd969a420b6c7f9aee321d218b7a9feb1c7158703 (diff)
downloadrockbox-9ac9cc6024271f806af23a84903d809eb145dc60.tar.gz
rockbox-9ac9cc6024271f806af23a84903d809eb145dc60.tar.bz2
rockbox-9ac9cc6024271f806af23a84903d809eb145dc60.zip
Working DM320 interrupts, changed the way registers are accessed in spi and uart drivers. Uart might be broken with interrupts - buttons on remote don't seem to respond when interrupts are enabled.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14836 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/mrobe500.c')
-rwxr-xr-xbootloader/mrobe500.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c
index 236fd99ff0..57df653f10 100755
--- a/bootloader/mrobe500.c
+++ b/bootloader/mrobe500.c
@@ -46,19 +46,20 @@ extern int line;
void main(void)
{
-/* unsigned char* loadbuffer;
+ unsigned char* loadbuffer;
int buffer_size;
int rc;
int(*kernel_entry)(void);
-*/
+
power_init();
+ lcd_init();
system_init();
kernel_init();
adc_init();
button_init();
backlight_init();
uartSetup();
- lcd_init();
+
font_init();
spi_init();
@@ -73,7 +74,6 @@ void main(void)
usb_init();
- #if 0
/* Enter USB mode without USB thread */
if(usb_detect())
{
@@ -99,18 +99,25 @@ void main(void)
reset_screen();
lcd_update();
}
- #endif
- printf("ATA");
-
- outw(inw(IO_GIO_DIR1)&~(1<<10), IO_GIO_DIR1); // set GIO26 (reset pin) to output
+ int button=0, *address=0x0, count=0;
while(true)
{
- if (button_read_device() == BUTTON_POWER)
+ button = button_read_device();
+ if (button == BUTTON_POWER)
{
printf("reset");
- outw(1<<10, IO_GIO_BITSET1);
+ IO_GIO_BITSET1|=1<<10;
}
+ if(button==BUTTON_RC_PLAY)
+ address+=0x02;
+ else if (button==BUTTON_RC_DOWN)
+ address-=0x02;
+ else if (button==BUTTON_RC_FF)
+ address+=0x1000;
+ else if (button==BUTTON_RC_REW)
+ address-=0x1000;
+
// if ((inw(IO_GIO_BITSET0)&(1<<14)) == 0)
{
short x,y,z1,z2, reg;
@@ -118,12 +125,15 @@ void main(void)
printf("x: %04x y: %04x z1: %04x z2: %04x", x, y, z1, z2);
printf("tsadc: %4x", tsc2100_readreg(TSADC_PAGE, TSADC_ADDRESS)&0xffff);
printf("current tick: %04x", current_tick);
+ printf("Address: 0x%08x Data: 0x%08x", address, *address);
+ printf("Address: 0x%08x Data: 0x%08x", address+1, *(address+1));
+ printf("Address: 0x%08x Data: 0x%08x", address+2, *(address+2));
tsc2100_keyclick(); /* doesnt work :( */
- line -= 3;
+ line -= 6;
}
-
}
-#if 0
+
+ printf("ATA");
rc = ata_init();
if(rc)
{
@@ -155,5 +165,4 @@ void main(void)
kernel_entry = (void*) loadbuffer;
rc = kernel_entry();
}
-#endif
}