XUD - enumerated?

Technical questions regarding the XTC tools and programming with XMOS.
egawtry
Member
Posts: 12
Joined: Thu Aug 18, 2011 9:51 pm

XUD - enumerated?

Post by egawtry »

How do I tell if my device has been enumerated via USB? There is a few cryptic header entries about status, but nothing on how to use 'em.

I am using the XUD library.

Thank you,
-Erik


User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

Your device is operational if it has received a standard device
"set configuration" setup (and acked it), and the last such
set config number is not zero.

In the HID example code, this is stored in the current_config
variable in the endpoint0 function.
User avatar
Ross
XCore Expert
Posts: 972
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

segher wrote:Your device is operational if it has received a standard device
"set configuration" setup (and acked it), and the last such
set config number is not zero.

In the HID example code, this is stored in the current_config
variable in the endpoint0 function.
+1 for this.

You should get this status in the endpoint 0 code, not directly from the XUD library.