diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-16 23:04:54 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-16 23:04:54 +0000 |
commit | 03ea24929779fd29ac95cb0bfd8945d269f3733d (patch) | |
tree | 507f688e96eae61ff990bee90ef49e042fde72ea | |
parent | 98b7da47e1c5c1e2b6b28193521161f99db74455 (diff) | |
download | rockbox-03ea24929779fd29ac95cb0bfd8945d269f3733d.tar.gz rockbox-03ea24929779fd29ac95cb0bfd8945d269f3733d.zip |
Try at implementing interrupt endpoints in the Ingenic Jz4740 USB driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20973 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/usb-jz4740.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c index be245ede8c..31b7098945 100644 --- a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c | |||
@@ -854,17 +854,22 @@ void usb_drv_release_endpoint(int ep) | |||
854 | 854 | ||
855 | int usb_drv_request_endpoint(int type, int dir) | 855 | int usb_drv_request_endpoint(int type, int dir) |
856 | { | 856 | { |
857 | logf("usb_drv_request_endpoint(%s)", (dir == USB_DIR_IN) ? "IN" : "OUT"); | 857 | logf("usb_drv_request_endpoint(%d, %s)", type, (dir == USB_DIR_IN) ? "IN" : "OUT"); |
858 | 858 | ||
859 | if (type != USB_ENDPOINT_XFER_BULK) | 859 | dir &= USB_ENDPOINT_DIR_MASK; |
860 | return -1; | 860 | type &= USB_ENDPOINT_XFERTYPE_MASK; |
861 | 861 | ||
862 | /* There are only 3+2 endpoints, so hardcode this ... */ | 862 | /* There are only 3+2 endpoints, so hardcode this ... */ |
863 | /* Currently only BULK endpoints ... */ | 863 | switch(type) |
864 | if(dir == USB_DIR_OUT) | 864 | { |
865 | return (1 | USB_DIR_OUT); | 865 | case USB_ENDPOINT_XFER_BULK: |
866 | else if(dir == USB_DIR_IN) | 866 | return (1 | dir); |
867 | return (1 | USB_DIR_IN); | 867 | |
868 | else | 868 | case USB_ENDPOINT_XFER_INT: |
869 | return -1; | 869 | if(dir == USB_DIR_IN) |
870 | return (2 | USB_DIR_IN); | ||
871 | |||
872 | default: | ||
873 | return -1; | ||
874 | } | ||
870 | } | 875 | } |