AnsweredAssumed Answered

Host Connect Detect f() for:  USBD_API->hw->Connect(g_hUsb, 1);

Question asked by Matt Ferrari on Nov 3, 2016
Latest reply on Nov 26, 2016 by Matt Ferrari

I'm building a USB MSC subsystem.  To initiate the enumeration, I call:    USBD_API->hw->Connect(g_hUsb, 1);

If the Host is present, I enumerate and all is well.


But what if the Host is not present / not connected?


Does the USB Library (LPC11U68) provide a complementary function I can call, or perhaps just a flag I can check to confirm that a connection has been established with the Host?


I need to cover the condition when USBD_API->hw->Connect(g_hUsb, 1) has been called, but the USB cable has not been connected to the Host (user error).  


Right now, my code implementation waits forever and I'd like to be able to check for positive confirmation that a Host on the other end has responded - to see if a Host is even there.


Can anyone point me to such a function or a flag provided by the LPCOpen USB Library for the LPC11U68?