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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

1,283件の閲覧回数
mattferrari
Contributor III

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?

Thanks,

Matt

ラベル(2)
0 件の賞賛
3 返答(返信)

1,008件の閲覧回数
soledad
NXP Employee
NXP Employee

Hello Matt,

Please check the below thread and let me know if this helps!!

Detect USB connect/disconnect using USBD ROM Stack? | www.LPCware.com 


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛

934件の閲覧回数
andarm
Contributor II

I can not open link, because of company policy. Could you send it here. Thanks. 

タグ(1)
0 件の賞賛

1,008件の閲覧回数
mattferrari
Contributor III

Thank you for the link.  This thread actually discusses USB Host, not End Point, so it didn't address my concern.  I have just decided to use a timeout and not worry about immediate confirmation of an attached Host, although I think the the USB Host Read Callback function could probably suffice for Host Present verification.  The Host will query the End Point to get information from it and that transaction could be used to do the "Host Present" confirmation I would think, although I don't know if there might be additional considerations with using this approach...

0 件の賞賛