summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-14 16:26:08 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-14 16:26:08 +0000
commit1e294e3f2518a5dd813a773b23271b12d22eeac4 (patch)
tree9c334b21456cbf5d806dbcfa7b9889bdb4fbaec1 /firmware/target/mips/ingenic_jz47xx/usb-jz4740.c
parente3f1a3f33ef2e0a1a5aaf6368fc79b7e4cae0d2b (diff)
downloadrockbox-1e294e3f2518a5dd813a773b23271b12d22eeac4.tar.gz
rockbox-1e294e3f2518a5dd813a773b23271b12d22eeac4.tar.bz2
rockbox-1e294e3f2518a5dd813a773b23271b12d22eeac4.zip
Onda VX747:
* Get rid of bug when interrupts are enabled * Get threading to work (although with some weirdness) * Other fixes/optimizations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18512 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/usb-jz4740.c')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/usb-jz4740.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c
index 92a2f3b801..cf107397e3 100644
--- a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c
@@ -824,25 +824,21 @@ void usbHandleStandDevReq(u8 *buf)
extern char printfbuf[256];
-int GET_CUP_INFO_Handle()
-{
- HW_SendPKT(0, printfbuf, 64);
- udc_state = IDLE;
- return 0;
-}
-
void usbHandleVendorReq(u8 *buf)
{
- int ret_state;
+ int ret_state, i;
USB_DeviceRequest *dreq = (USB_DeviceRequest *)buf;
- switch (dreq->bRequest) {
- case 0xAB:
- ret_state=GET_CUP_INFO_Handle();
- break;
- case 0x12:
- HW_SendPKT(0, "TEST", 4);
- udc_state = IDLE;
- break;
+ switch (dreq->bRequest)
+ {
+ case 0xAB:
+ //for(i=0; i<256; i+=64)
+ HW_SendPKT(0, printfbuf, 64);
+ udc_state = IDLE;
+ break;
+ case 0x12:
+ HW_SendPKT(0, "TEST", 4);
+ udc_state = IDLE;
+ break;
}
}
@@ -1032,6 +1028,9 @@ void __udc_start(void)
system_enable_irq(IRQ_UDC);
}
-void usb_init_device(void){}
+void usb_init_device(void)
+{
+ __udc_start();
+}
#endif