lufa icon indicating copy to clipboard operation
lufa copied to clipboard

Mass storage, eject/unmount detection?

Open jmamma opened this issue 3 years ago • 1 comments

How can we prevent re-enumeration when the mass storage device is unmounted from the host computer?

After unmounting on Windows/Mac it remounts a short time afterwards.

I'm running this on an Atmega16/32u2.

I've experimented with EVENT_USB_Device_Disconnect(), EVENT_USB_Device_Reset() and EVENT_USB_Device_Suspend() to prevent re-enumeration but no luck.

Is this a consequence of VBUS sense ?

  • Justin

jmamma avatar Jun 28 '22 06:06 jmamma

Worked out this needs to be done at the SCSI layer.

case SCSI_CMD_START_STOP_UNIT:

Is the medium eject command.

jmamma avatar Jun 28 '22 11:06 jmamma