summaryrefslogtreecommitdiff
path: root/firmware/usbstack/usb_core.c (follow)
Commit message (Collapse)AuthorAge
* Enforce the 80-char limit to make everyone happy.Amaury Pouly2010-04-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25619 a1c6a512-1295-4272-9138-f99709370657
* - Forget a cosmetic change.Amaury Pouly2010-04-13
| | | | | | - Interface number is in lower half of wIndex for interface control requests. Upper half is reserved and used in other protocols. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25618 a1c6a512-1295-4272-9138-f99709370657
* Attempt to have a consistent coding convention in usb_core.cAmaury Pouly2010-04-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25617 a1c6a512-1295-4272-9138-f99709370657
* Remove unnecessary (and incorrect) acks after stalling the control endpointFrank Gevaerts2010-03-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25359 a1c6a512-1295-4272-9138-f99709370657
* - Fix the control_handler selection in usb_core when a request in sent to an ↵Amaury Pouly2010-03-08
| | | | | | | | endpoint (use endpoint dir and not EP_CONTROL !) - Only interpret standard endpoint requests (previous code didn't check the request type) and pass all others to usb drivers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25069 a1c6a512-1295-4272-9138-f99709370657
* use the EP_DIR() macro to go from USB_DIR_* to a 0 or 1 valueFrank Gevaerts2009-11-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23640 a1c6a512-1295-4272-9138-f99709370657
* Don't use the same completion_event for both directions. This could cause ↵Frank Gevaerts2009-11-15
| | | | | | problems on USB controllers that have IN and OUT endpoints with the same endpoint number (such as the arc controller) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23639 a1c6a512-1295-4272-9138-f99709370657
* Comment out LOGF_ENABLE defines everywhere, replace evil commentsJeffrey Goode2009-11-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23497 a1c6a512-1295-4272-9138-f99709370657
* Change control handling to start expecting host packets before sending data ↵Frank Gevaerts2009-10-19
| | | | | | to the host. This makes the handling less timing sensitive on some controllers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23263 a1c6a512-1295-4272-9138-f99709370657
* USB: Use explicit casting when setting wTotalLength field in descriptorTomer Shalev2009-10-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23157 a1c6a512-1295-4272-9138-f99709370657
* Commit "FS#10468 - USB HID: Show keypad mode on screen"Tomer Shalev2009-09-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22852 a1c6a512-1295-4272-9138-f99709370657
* Remove USB storage defines from USB coreMaurus Cuelenaere2009-07-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22018 a1c6a512-1295-4272-9138-f99709370657
* always call the class driver init function. This is needed because they are ↵Frank Gevaerts2009-05-24
| | | | | | called before the usb_core_enable_driver() calls, so depending on enabled status breaks things git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21069 a1c6a512-1295-4272-9138-f99709370657
* Reorganise USB stack defines. Now config.h decides which class drivers get ↵Frank Gevaerts2009-05-23
| | | | | | | | | enabled instead of usb_core.h Also enable HID, and use that as the dummy class instead of charging-only for controllers that have working interrupt transfers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21053 a1c6a512-1295-4272-9138-f99709370657
* Fix #ifdef nesting to allow USB_HID to be built without USB_CHARGING_ONLY ↵Frank Gevaerts2009-05-23
| | | | | | (FS#10236 by Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21052 a1c6a512-1295-4272-9138-f99709370657
* Add working USB HID driver, by Tomer Shalev (part of his GSoC work).Frank Gevaerts2009-05-16
| | | | | | | | | This needs support for usb interrupt transfers, so there are some changes in various USB drivers as well (only usb-drv-arc supports it at this point, others won't have working HID yet). HID is disabled for now, as the apps/ part is not included yet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20962 a1c6a512-1295-4272-9138-f99709370657
* Disable usage of USB serial descriptor when no unique one is availableMaurus Cuelenaere2009-04-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20761 a1c6a512-1295-4272-9138-f99709370657
* Add preliminary HID driver. It doesn't do anything yet, but that should ↵Frank Gevaerts2009-04-19
| | | | | | change soon (FS#10116 by Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20750 a1c6a512-1295-4272-9138-f99709370657
* reorganise usb_core.c a bit, to make the code more readable and more ↵Frank Gevaerts2009-04-19
| | | | | | maintainable (FS#10150 by Tomer Shalev)) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20748 a1c6a512-1295-4272-9138-f99709370657
* USB related Cosmetics, whitespace and readability fixes (FS#10147 by Tomer ↵Frank Gevaerts2009-04-18
| | | | | | Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20737 a1c6a512-1295-4272-9138-f99709370657
* Allow class drivers to reuse the core data buffer for control transfers. ↵Frank Gevaerts2009-04-18
| | | | | | This doesn't make much difference right now, but it should keep HID memory usage lower (once HID is ready) (FS#10146 by Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20735 a1c6a512-1295-4272-9138-f99709370657
* Fix unintentional usage of relatively unknown C features (FS#10119, found by ↵Frank Gevaerts2009-04-11
| | | | | | Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20685 a1c6a512-1295-4272-9138-f99709370657
* Correct Björn's name in various file headers.Nicolas Pennequin2009-03-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20491 a1c6a512-1295-4272-9138-f99709370657
* USB detection changes. c200/e200: Consider USB to be powered when charger is ↵Michael Sevakis2009-01-19
| | | | | | plugged but detect USB connection by bus reset. When received, disconnect and restart the driver fully enabled. imx31: Fix hack used to make initial connect succeeded-- set PHY type before initial reset. General: Move some target code out of usb-drv-arc.c and implement it in respective usb sources and CPU headers so things stay clean. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19797 a1c6a512-1295-4272-9138-f99709370657
* USB retweaking: Take out the USB_REQUEST/RELEASE_DISK scheme and simply ask ↵Michael Sevakis2009-01-13
| | | | | | the USB core whether or not any drivers require exclusive access at the moment of connect. Doing anthing else just produces nasty effects on Windows because it expects some communication just for enabling the PHY and not allowing it to mount volumes if a thread doesn't ack causes annoying error message boxes. Make behavior of each USB type identical from the system perspective. Some miscellaneous changes (simplify, ata->storage naming, define only used USB_* enums values were possible). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19762 a1c6a512-1295-4272-9138-f99709370657
* Add a disconnect handler for usb storage. It doesn't do anything yet, but it ↵Frank Gevaerts2008-12-13
| | | | | | will apparently be needed to reset the audio buffer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19418 a1c6a512-1295-4272-9138-f99709370657
* Replace USE_HIGH_SPEED with USB_NO_HIGH_SPEED, as high speed support is the ↵Frank Gevaerts2008-11-30
| | | | | | normal case git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19274 a1c6a512-1295-4272-9138-f99709370657
* Move tcc77x/usb-tcc77x.c to usb-tcc.c as it is more general than just tcc77x ↵Frank Gevaerts2008-11-30
| | | | | | | | | | (even usb-tcc is too specific, but I don't know anything better) Add #if0ed USB defines to config-cowond2.h, so experimenting with USB is easy Add dummy set_serial_descriptor() implementation to usb_core.c. This one doesn't generate a unique serial, so it must never be used for non-testing purposes. When usaed, a compiler warning will be generated git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19273 a1c6a512-1295-4272-9138-f99709370657
* Add ramdisk storage driver. It will be useful for developing multi-driver ↵Frank Gevaerts2008-11-03
| | | | | | storage git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18993 a1c6a512-1295-4272-9138-f99709370657
* Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts2008-11-01
| | | | | | | | | that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
* Abstract the PortalPlayer AS3514 handling with an "ascodec" API - inspired ↵Dave Chapman2008-10-31
| | | | | | by the wmcodec API used with the Wolfson codecs. The intention is to implement this API for the AS3525 and then share code with the Sansa V2 ports. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18940 a1c6a512-1295-4272-9138-f99709370657
* disable logf againFrank Gevaerts2008-10-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18704 a1c6a512-1295-4272-9138-f99709370657
* reorganise the USB stack a bit to allow for easier integration of non-ARC ↵Frank Gevaerts2008-10-03
| | | | | | controller drivers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18703 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* add usb_allowed_current() function, so powermanagement code can know when ↵Frank Gevaerts2008-06-04
| | | | | | it's allowed to charge from usb git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17688 a1c6a512-1295-4272-9138-f99709370657
* - change the usb class driver framework to allow for device classes with ↵Frank Gevaerts2008-04-26
| | | | | | | | | | more than one interface or more than one endpoint pair - move the charging-only dummy driver out of usb_core git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17252 a1c6a512-1295-4272-9138-f99709370657
* UMS for the Gigabeat S. Bootloader USB mode. Has a couple quirks 1) First ↵Michael Sevakis2008-04-18
| | | | | | plug has problems if cold. Replug if it doesn't connect or not at high speed 2) Linux doesn't like the odd bootable flag value used in the partitions so it won't mount but Windows works. Fix minor OTG driver bugs and clean up device memory handling. Generic name for ARC controller driver. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17154 a1c6a512-1295-4272-9138-f99709370657
* Fix yellow. usb_strings needs to point to const data as well.Michael Sevakis2008-04-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17141 a1c6a512-1295-4272-9138-f99709370657
* Simpilify the uncached buffer allocation for the USB stack using ↵Michael Sevakis2008-04-16
| | | | | | NOCACHEBSS_ATTR. This will probably get abstracted since the appropriate way to handle it will be somewhat target-specific. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17140 a1c6a512-1295-4272-9138-f99709370657
* FS#8898 - Prefix AS3514 registers with AS3514_Bertrik Sikken2008-04-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17130 a1c6a512-1295-4272-9138-f99709370657
* make the usb storage driver handle hotswap correctly, and exit the usb ↵Frank Gevaerts2008-03-10
| | | | | | screen once all drives are "ejected" (either as a command from the OS or physically) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16617 a1c6a512-1295-4272-9138-f99709370657
* make usb_serial work again. Also know as "make sure arrays are allocated at ↵Frank Gevaerts2008-03-10
| | | | | | their correct size" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16615 a1c6a512-1295-4272-9138-f99709370657
* reorganise the usb stack to provide a clean separation between core and ↵Frank Gevaerts2008-03-06
| | | | | | class drivers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16541 a1c6a512-1295-4272-9138-f99709370657
* handle interface-specific control requests a bit more cleanlyFrank Gevaerts2008-03-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16519 a1c6a512-1295-4272-9138-f99709370657
* present a different USB serial number depending on which USB class drivers ↵Frank Gevaerts2008-03-04
| | | | | | are enabled. This is needed for Windows to correctly detect the device if a different set of drivers is active than on the previous plugin git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16511 a1c6a512-1295-4272-9138-f99709370657
* remove usb_benchmark. Its usefulness is extremely limited, and the usb stack ↵Frank Gevaerts2008-03-03
| | | | | | around it is moving fast, so it's likely to suffer from bit rot very soon. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16500 a1c6a512-1295-4272-9138-f99709370657
* only send a Charging Only interface if nothing else is sentFrank Gevaerts2008-03-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16499 a1c6a512-1295-4272-9138-f99709370657
* add some #ifdefs to gt rid of some unused variable warnings (and their RAM use)Frank Gevaerts2008-03-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16487 a1c6a512-1295-4272-9138-f99709370657
* implement logf over usb-serial. Needs USB_SERIAL defined in usb_core.h to ↵Frank Gevaerts2008-03-02
| | | | | | | | | work, and needs to be enabled in the debug menu. It stops sending data after a while for unknown reasons. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16486 a1c6a512-1295-4272-9138-f99709370657
* update the bNumInterfaces field in the configuration descriptor correctlyFrank Gevaerts2008-03-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16485 a1c6a512-1295-4272-9138-f99709370657