summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-30 13:24:29 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-30 13:24:29 +0000
commit6c77cc3576ab3ebd401c52e7e53b84042e052dbe (patch)
tree5756751b51bbbf5c4856bbabb8ae6731527b9d02 /apps
parente0b23fe50d1d3a80d4778195c2e7b1fc8098a603 (diff)
Now enables USB monitoring
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1265 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/main.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/apps/main.c b/apps/main.c
index 47c91ddada..c43248e45a 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -29,6 +29,7 @@
#include "panic.h"
#include "menu.h"
#include "system.h"
+#include "usb.h"
#ifndef SIMULATOR
#include "dmalloc.h"
#include "bmalloc.h"
@@ -41,10 +42,40 @@
#include "version.h"
+#include "sh7034.h"
+#include "sprintf.h"
+
char appsversion[]=APPSVERSION;
void init(void);
+/* Test code!!! */
+void dbg_ports(void)
+{
+ unsigned short porta;
+ unsigned short portb;
+ unsigned char portc;
+ char buf[32];
+
+ lcd_clear_display();
+
+ while(1)
+ {
+ porta = PADR;
+ portb = PBDR;
+ portc = PCDR;
+
+ snprintf(buf, 32, "PCDR: %04x", porta);
+ lcd_puts(0, 0, buf);
+ snprintf(buf, 32, "PCDR: %04x", portb);
+ lcd_puts(0, 1, buf);
+ snprintf(buf, 32, "PCDR: %02x", portc);
+ lcd_puts(0, 2, buf);
+ lcd_update();
+ sleep(HZ/10);
+ }
+}
+
void app_main(void)
{
init();
@@ -89,6 +120,8 @@ void init(void)
#endif
set_irq_level(0);
+ usb_init();
+
rc = ata_init();
if(rc)
panicf("ata: %d",rc);
@@ -107,6 +140,8 @@ void init(void)
mpeg_init( global_settings.volume,
global_settings.bass,
global_settings.treble );
+
+ usb_start_monitoring();
}
int main(void)