Verify correct enumeration?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
guscrown
Posts: 6
Joined: Sat Apr 11, 2015 5:44 am

Verify correct enumeration?

Post by guscrown » Sat Apr 18, 2015 12:24 am

Is there a way to confirm correct enumeration? This way we can trigger a "disconnect" and "reconnect" to attempt enumeration again. Or what about a way to tell if the device was de-enumerated?

guscrown
Posts: 6
Joined: Sat Apr 11, 2015 5:44 am

Re: Verify correct enumeration?

Post by guscrown » Sat Apr 18, 2015 6:20 pm

If anybody else is wondering you can use usbDeviceAddress, I believe it is a global variable; if it's "0" it means the device was not enumerated. If it's different than "0" it means it was.

Alternatively, people have been using usbSofCount to monitor the host-device link, but to do this you have to wire D- to INT0. I will test this option on Monday when I have access to my board again.

Post Reply