using 1.7, USB mass storage to PC / Mac and set up in device mode. When the PC user "ejects" the device, the device gets locked in a dead loop at:
file: device_mass_storage.c
function: static void usb_mass_storage_csw(void)
code;
while (Is_usb_endpoint_stall_requested(EP_MS_OUT))
{
if (Is_usb_setup_received()) usb_process_request();
}
The problem is that under this "Eject" situation, the function Is_usb_setup_received() returns false, but Is_usb_endpoint_stall_requested(EP_MS_OUT) is always true. Hence the infinite loop.
What do you suggest? What is the proper way to detect the Eject event, and handle it?
Thanks rossh