Revision 270
Added by markw almost 11 years ago
usb.c | ||
---|---|---|
#include <stdio.h>
|
||
//#include <stdio.h>
|
||
|
||
#include "timer.h"
|
||
#include "usb.h"
|
||
... | ... | |
static usb_device_t dev[USB_NUMDEVICES];
|
||
|
||
void usb_reset_state() {
|
||
puts(__FUNCTION__);
|
||
iprintf("%s\n",__FUNCTION__);
|
||
bmHubPre = 0;
|
||
}
|
||
|
||
... | ... | |
}
|
||
|
||
void usb_init() {
|
||
puts(__FUNCTION__);
|
||
iprintf("%s\n",__FUNCTION__);
|
||
|
||
// MWW max3421e_init(); // init underlaying hardware layer
|
||
usbhostslave[OHS900_HOSTSLAVECTLREG] = OHS900_HSCTLREG_RESET_CORE;
|
||
... | ... | |
iprintf("Setting addr %x\n", i+1);
|
||
rcode = usb_set_addr(d, i+1);
|
||
if(rcode) {
|
||
puts("failed to assign address");
|
||
iprintf("failed to assign address\n");
|
||
return rcode;
|
||
}
|
||
|
||
... | ... | |
if (!rcode) {
|
||
d->class = class_list[c];
|
||
|
||
puts(" -> accepted :-)");
|
||
iprintf(" -> accepted :-)\n");
|
||
// ok, device accepted by class
|
||
|
||
return 0;
|
||
}
|
||
|
||
puts(" -> not accepted :-(");
|
||
iprintf(" -> not accepted :-(\n");
|
||
}
|
||
} else
|
||
iprintf("no more free entries\n");
|
Also available in: Unified diff
Fixes to make this build into ZPU firmware