mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
hibyr1 defines HAVE_USB_ADB so the USB mode setting offers an ADB entry, but hiby_set_usb_mode() never handled USB_MODE_ADB (it fell through to default), so selecting ADB did nothing. Wire USB_MODE_ADB up to enable_adb(). It builds the adb function on the gadget and hands the functionfs mount and adbd to the vendor respawner /sbin/adbserver.sh, rather than mounting functionfs inline (which the original code flagged as flaky); adbd binds the UDC itself, so usb_enable() leaves the UDC alone in ADB mode. disable_adb() unlinks the adb function and unmounts its functionfs but leaves the function in place to be reused, matching how adbserver.sh cycles it, so re-enabling adb never re-creates it. The mass-storage LUN is removable, so the host clears its backing file when it ejects the volume (Linux does this on unmount). Re-arm the LUN in usb_enable() on each connect, so the disk is exported on every insert and not only the first. Assisted-by: Claude Opus 4.8 Change-Id: Ia8f119a1a599e6dd3c1219cb4e193c753725a06a |
||
|---|---|---|
| .. | ||
| arm | ||
| coldfire | ||
| hosted | ||
| mips | ||