So working on an embedded system I have a USB drive that is used to charge the device as well as reading some data.
Using usbd_core.c
I can check the status,
- when there's nothing connected the status is
4
(USBD_STATE_SUSPENDED
). - As soon as I connect something the status changes to
1
(USBD_STATE_DEFAULT
). - But when I disconnect it the status doesn't change, it continues to be
1
(USBD_STATE_DEFAULT
).
Is it supposed to be like this or I am missing something?
I have also tried USBD_Stop()
and USBD_Start()
to see if it makes any difference but still the status doesn't change when I disconnect it.
Any ideas?