summaryrefslogtreecommitdiffstats
path: root/bootloader/mrobe500.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-09-20 14:16:25 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-09-20 14:16:25 +0000
commitd7c3d80258859d154475d7930becfe1c6639f58b (patch)
treefa657490b5ae0eda3688171d5ee646d0e323d229 /bootloader/mrobe500.c
parent4d853fff2f8f79e896643ca02b566c0708262e98 (diff)
downloadrockbox-d7c3d80258859d154475d7930becfe1c6639f58b.tar.gz
rockbox-d7c3d80258859d154475d7930becfe1c6639f58b.zip
(mr500) reset if power is pressed, not very nice, but im sick of using the remote to reset
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14780 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/mrobe500.c')
-rwxr-xr-xbootloader/mrobe500.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c
index fd2587eda2..d0b9c2b717 100755
--- a/bootloader/mrobe500.c
+++ b/bootloader/mrobe500.c
@@ -17,7 +17,7 @@
*
****************************************************************************/
- #include "inttypes.h"
+#include "inttypes.h"
#include "string.h"
#include "cpu.h"
#include "system.h"
@@ -55,6 +55,7 @@ void main(void)
uartSetup();
lcd_init();
font_init();
+ // dm320_spi_init();
lcd_setfont(FONT_SYSFIXED);
@@ -98,18 +99,20 @@ void main(void)
printf("ATA");
int count = 0, i = 0, c = 0;
char data[64];
+ unsigned short out[] = {0x8000};
+ unsigned short in[2];
+ outw(inw(IO_GIO_DIR1)&~(1<<10), IO_GIO_DIR1); // set GIO26 to output
+
while(true)
{
- i = button_read_device();
- c++;
- if (i)
+ if (button_read_device() == BUTTON_POWER)
{
- c = 0;
- __backlight_on();
- printf("button: %x", i);
+ printf("reset");
+ outw(1<<10, IO_GIO_BITSET1);
}
- else if (c>50)
- __backlight_off();
+ // dm320_spi_block_transfer(0, out, 16, 16, in, 0);
+ // printf("%x", in[0]);
+
}
#if 0
rc = ata_init();