SCSI Eject events are obscured by the STMicro USB drivers. Is there a bug in the driver?
I have a STM32 based device which switches on command from a USB/CDC device to a USB/MSC device. What I need now is a way to switch the STM32 based device back to USB/CDC. I see where the SCSI Eject command is processed and reported by the STMicro drivers to my code. This in fact works. However, I find I need to send the Eject command twice. This is unexpected.
Using a debugging tool, I break on my code and see not until the 2nd SCSI Eject command does the STMicro flag change state to EJECT (possible STMicro driver states: EJECT, LOCKED & UN-LOCKED). But, when debugging the STMicro driver its self, I see where the STMicro flag is being set to EJECT upon the 1st SCSI Eject command! However, this gets obscured because the STMicro driver also sets this flag to either LOCKED or UN-LOCKED depending on if the USB/MSD is mounted or not mounted during the time of the SCSI Ejection.
Why is this? Why can not the STMicro driver use an independent flag for each state? Or, is it possible I am using the driver incorrectly?
-thanks
