1
0
Fork 0
forked from len0rd/rockbox

Now enables USB monitoring

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1265 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2002-06-30 13:24:29 +00:00
parent e0b23fe50d
commit 6c77cc3576

View file

@ -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)