summaryrefslogtreecommitdiff
path: root/firmware/export/usb.h (follow)
Commit message (Collapse)AuthorAge
* usb: make usb_release_exclusive_storage privateAmaury Pouly2015-01-08
| | | | | | Change-Id: I0383760b7d8e67cc99bbe4e4979bca92ef436c8d Reviewed-on: http://gerrit.rockbox.org/1098 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* Clarify usb_powered() and fix some code.Amaury Pouly2015-01-08
| | | | | | | | | | Either by mistake or because its meaning changed, usb_powered() doesn't mean what the name suggest, so clarify its meaning by renaming it to usb_powered_only. So use of usb_powered() are replaced by usb_inserted() when it makes more sense. Change-Id: I112887e2d8560e84587bee5f55c826dde8c806d8 Reviewed-on: http://gerrit.rockbox.org/1097 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* usb: document usb states, powering and detectionAmaury Pouly2015-01-08
| | | | | | Change-Id: Ia3b7d6c6294bfb9272355c3f28a994dd0e83cbce Reviewed-on: http://gerrit.rockbox.org/1096 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* usb: document usb_status_event and #ifdef it with USB_STATUS_BY_EVENTAmaury Pouly2015-01-08
| | | | | | Change-Id: I62cdb8ad71a598279fe99cc91d87eafda26cbbc7 Reviewed-on: http://gerrit.rockbox.org/1095 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* usb: move usb charging function prototype from usb_core.h to usb.hAmaury Pouly2015-01-08
| | | | | | Change-Id: Id29c60d3aa26f8badca6c38c1cbb2e5a39c554dc Reviewed-on: http://gerrit.rockbox.org/1094 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
* usb: add support for hardware handled SET ADDR/CONFIGAmaury Pouly2012-12-07
| | | | | | | | | | | | | | | | | | | | | | | Some USB controllers like the one of the Rockchip 27xx handle some requests in pure hardware. This is especially a problem for two of them: - SET ADDR which is used by our core to track the DEFAULT/ADDRESS state and is required for the drivers to work properly - SET CONFIG which is used by our core to initialise the drivers by calling init_connection() In these cases we need a way to notify the core that such requests happened. We do this by exporting two functions which directly notify the core about these requests and perform the necessary init steps required without doing the actual USB transfers. Special care is needed because these functions could be called from an interrupt handler. For this reason we still use the usb_queue and introduce new IDs so that they are processed in order and safely. No functional change is intended, both in the usbstack and on targets without such quirks. Change-Id: Ie42feffd4584e88bf37cff018b627f333dca1140
* Reorganise USB initialisation to not depend on a specific enumeration ↵Frank Gevaerts2012-01-04
| | | | | | | | | | sequence, by Bartosz Fabianowski, with minor tweaks by Michael Sevakis (FS#12497) FreeBSD apparently sends a SET_ADDRESS first, which confused our code. This patch fixes that, and also simplifies the connection handling a bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31582 a1c6a512-1295-4272-9138-f99709370657
* usb_init_device(): move prototype to usb.hRafaël Carré2011-12-31
| | | | | | Get rid of some usb-target.h files git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31487 a1c6a512-1295-4272-9138-f99709370657
* Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR.Boris Gjenero2011-12-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
* Simplify and neaten-up usb.c a bit. USB_INSERTED and USB_EXTRACTED are ↵Michael Sevakis2011-12-15
| | | | | | always used as events to indicate cable state. USB_HOSTED is posted to indicated that a host was detected. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31263 a1c6a512-1295-4272-9138-f99709370657
* FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero2011-12-14
| | | | | | data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
* Remove obsolete USB_DETECT_BY_DRV define throughout.Michael Sevakis2011-09-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30549 a1c6a512-1295-4272-9138-f99709370657
* Add "USB Hide Internal Drive" option for multidrive devices with software usb.Frank Gevaerts2011-09-09
| | | | | | | | This option allows accessing the card slot from "dumb" USB hosts like some car audio systems that do not handle multi-LUN devices. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30489 a1c6a512-1295-4272-9138-f99709370657
* The gigabeat S needs special casing so that you can still hold vol down to ↵Michael Giacomelli2011-05-16
| | | | | | access its firmware partition. Additionally, the same logic should apply to firewire on the iPods. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29890 a1c6a512-1295-4272-9138-f99709370657
* Enter USB charging mode on devices that support it if any key is held down ↵Michael Giacomelli2011-05-16
| | | | | | during USB insert (except on Archos where certain keys need to be avoided and players like the iRiver H1x0 which do not charge over USB and the iAudios/AMSv2 which do not yet support USB fully). Update the manual to explain the new behavior. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29889 a1c6a512-1295-4272-9138-f99709370657
* Try to get some control over #ifdef hell in usb.c by refactoring and inline ↵Michael Sevakis2011-01-18
| | | | | | function use. SYS_USB_DISCONNECTED_ACK hasn't been doing anything useful for the USB thread; remove it. USB thread simply ignores that value. Observe only valid usb_state transitions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29084 a1c6a512-1295-4272-9138-f99709370657
* Add a higher level USB detection that prevents fraudulent bus resets from ↵Michael Sevakis2011-01-17
| | | | | | causing USB mode to be entered. Enable for SA9200 only at this time. Also, for SA9200, use the bus power GPIO rather than the 'connector inserted' GPIO to detect the cable. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29068 a1c6a512-1295-4272-9138-f99709370657
* Bootloader USB mode for PP502x. Enable only on GoGear SA9200 for the time ↵Michael Sevakis2011-01-15
| | | | | | being. Add HAVE_BOOTLOADER_USB_MODE to config if BOOTLOADER is defined to enable it. Clean up some kernel stuff a little to support it. Mess up a bunch of other stuff (hopefully not too badly). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29053 a1c6a512-1295-4272-9138-f99709370657
* HDD6330: Try to adapt the keys for the new touchpad code, remove the non ↵Szymon Dziok2010-10-18
| | | | | | existing buttons, enable morse input. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28306 a1c6a512-1295-4272-9138-f99709370657
* New USB charging system, part 2 - "Force" charging modeTorne Wuff2010-06-05
| | | | | | | Enable support for the "force" mode of USB charging. This should work on Gigabeat S and Nano2g (and any other future target which has a RB usb stack and supports charging) - if a host connection is not detected within 10 seconds of USB insertion, assume that the connected device is an AC charger and charge anyway, if the user has specified "force" as the mode. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26594 a1c6a512-1295-4272-9138-f99709370657
* New USB charging system, part 1 - API rework and user-visible setting updateTorne Wuff2010-06-05
| | | | | | | | | | | | | | | 1) "Charge during USB connection" option is now tristate: off/on/force. Currently "force" behaves just like "on", but in future it will allow charging even when it was not possible to positively identify a charger. 2) The H300 code has been adjusted to use the new system but there should be no functional differences, it already had the USB charging option and its USB/charging support is hardware controlled. 3) The Gigabeat S code has been adjusted to use the new system: the player now has the USB charging option, which wasn't previously available. The player will only charge at full speed when allowed to do so by a working USB host, so USB AC adapters won't work very well; however, they didn't work before either, so this is not a change in functionality. 4) The iPod Nano 2G code has been adjusted to use the new system: it already had the USB charging option. Using a USB AC adapter won't charge at full speed any more (it did before) - the old implementation was equivalent to the not-yet-implemented "force" option in the new system. No other target should be affected. Support for the "force" mode and support for at least some other iPod models will come in a future commit :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26570 a1c6a512-1295-4272-9138-f99709370657
* FS#10756 - Free unused init codeThomas Martitz2010-03-03
| | | | | | | Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back. Only implemented for PP and as3525 so far. More targets could be added, as well as more functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657
* Add initial Packard Bell Vibe 500 port, by Szymon Dziok Frank Gevaerts2010-01-18
| | | | | | | | Author: Szymon Dziok Flyspray: FS#10912 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24276 a1c6a512-1295-4272-9138-f99709370657
* Merry Christmas Gogear HDD6330 owners! This is the start of the HDD6330 ↵Mark Arigo2009-12-25
| | | | | | port. At the moment, it's essentially a copy of the HDD1630 port with a minimal LCD driver. The touchpad doesn't work as expected, but you can still kind of navigate and listen to music/radio. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24112 a1c6a512-1295-4272-9138-f99709370657
* Onda VX747: add USBPOWER_BUTTON and USBPOWER_BTN_IGNOREMaurus Cuelenaere2009-12-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24072 a1c6a512-1295-4272-9138-f99709370657
* Cowon D2: Rename COWOND2_PAD -> COWON_D2_PAD to match macro used in manual, andTomer Shalev2009-12-15
| | | | | | | to target naming conventions in general git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24010 a1c6a512-1295-4272-9138-f99709370657
* M:Robe 500/M66591 USB improvements: Interrupts now work, a bug in odd-length ↵Karl Kurbjun2009-11-02
| | | | | | transfers has been fixed. Buffers that are not initially short aligned are also now supported. Enable USB HID mouse mode. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23483 a1c6a512-1295-4272-9138-f99709370657
* FS#10704 - Make a configuration option to disable USB HID Tomer Shalev2009-10-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23322 a1c6a512-1295-4272-9138-f99709370657
* D2 should have HAVE_USB_POWER defined.Rob Purchase2009-10-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23298 a1c6a512-1295-4272-9138-f99709370657
* Philips SA9200: Working touchpad and button lights! Also, improvements to ↵Mark Arigo2009-06-19
| | | | | | the keymap (still needs work). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21346 a1c6a512-1295-4272-9138-f99709370657
* 3 new ports: Samsung YH-820, YH-920, and YH-925. Mostly functional. Audio ↵Mark Arigo2009-05-25
| | | | | | working on 820 & 925 (untested on the 920). No battery readings. No recording. No plugins. Keymap needs work. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21083 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
* 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
* 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
* Fix some whitespace issues (including tabs that slipped in somehow) ↵Frank Gevaerts2009-04-18
| | | | | | (FS#10144 by Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20731 a1c6a512-1295-4272-9138-f99709370657
* Allow the user to leave MSC mode by pressing the USB POWER button (the one ↵Frank Gevaerts2009-03-08
| | | | | | | | | | that's used to go to usb power mode on plugin) when the host OS hasn't locked the device. This only works for devices that expose a removable device, so for now the gigabeat S is out of luck. (slightly modified from FS#9993) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20244 a1c6a512-1295-4272-9138-f99709370657
* Leave "usb mode" when all LUNs are ejected againFrank Gevaerts2009-02-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20139 a1c6a512-1295-4272-9138-f99709370657
* Use bus reset detection for all ARC OTG devices. Remove conflict from ↵Michael Sevakis2009-01-22
| | | | | | LV24020LP driver with some GPIO-by-number macros for PP502x. Start monitoring for USB stack once all core threads and queues are created otherwise queues will likely be registered after USB acks. Putting PP502x system_reboot in IRAM (unmapped, uncached) memory seems to help it work more consistently. Hopefully I got all the PP USB connect handlers in the right spot in irq_handler. If device seems unresponsive to cable, check there first. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19819 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
* Gigabeat S has no need for a USB tick. Put in a simple framework that allows ↵Michael Sevakis2009-01-14
| | | | | | USB monitoring by event. Also add a couple missed usb_enable calls when the connection is not for 'slave mode'. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19768 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
* Gigabeat S: Implement charging and power control to charge from AC or USB. ↵Michael Sevakis2008-12-21
| | | | | | Hold MENU while plugging USB cable to charge from USB without connecting. Under Windows, plugging USB for charging only but not connecting still needs to be properly handled (driver popup issue) but it will charge when connected normally-- no issue under Linux. Some accomodating changes made to powermgmt.c will soon be made nicer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19547 a1c6a512-1295-4272-9138-f99709370657
* Add more driver stubs to make the Fuze and e200v2 main builds compile; ↵Dave Chapman2008-11-11
| | | | | | Correct the memory definition for the Fuze (8MB) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19090 a1c6a512-1295-4272-9138-f99709370657
* Sansav2 BootloaderRafaël Carré2008-11-09
| | | | | | | | Adds read-only SD driver, largely copied from ata-sd-pp.c Only tested on the embedded SD, on the Clip First steps to build a Normal firmware git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19045 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
* Bring the H300 charging-only button in line with the other targets. Hold ↵Marc Guay2008-07-04
| | | | | | the AB button on connect for this feature. To discuss a greater reworking of the function, see FS#8702. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17940 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
* My Devcon 2008 contribution: port for Philips GoGear HDD1630 (PP5022-based). ↵Mark Arigo2008-06-27
| | | | | | Current status is that the bootloader works to load Rockbox, but dual boot does not work: it freezes after decrypting the OF. When Rockbox boots, it freezes somewhere between showing the logo and the main menu. And there's no driver for the touchpad. So lots of work left. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17809 a1c6a512-1295-4272-9138-f99709370657
* Philips GoGear SA9200 port. Working bootloader and normal builds, including ↵Mark Arigo2008-05-21
| | | | | | sound. No touchpad now, buttons limited to using vol+/vol-/power for up/down/select. Rockbox USB is enabled since the OF is MTP only...read the warnings on the PortalPlayerUsb wiki page. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17591 a1c6a512-1295-4272-9138-f99709370657
* Bring Gigabeat S bootloader one step close to a release version.Michael Sevakis2008-05-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17442 a1c6a512-1295-4272-9138-f99709370657