The Maple boards with the STM32F103 have a circuit that is able to switch in or out the 1.5K pull-up on D+, and this is called the "disconnect" circuit. If the pullup is removed, it is the same as if the device was unplugged.
The host only resets on device at a time (so there must be some location based addressing scheme to allow this). On being reset, the device will respond on the default address 0 to allow it to be configured.
The host now asks for the maximum packet size using "Get Descriptor". The host may then reset it again, the perform a "Set Address"
Now the host is at its leisure to service other devices, but will continue to interrogate the new device asking for various descriptors. The idea is to get enough information for the host to set up the proper device driver. Then the host will send a "Set Configuration" request.
A device may have multiple configurations, but it is not common. Only one can be set up and active at a time. Some operating systems always select the first configuration and ignore the others (Windows). A device can have multiple interfaces, each with multiple endpoints.
As near as I can tell, this whole business of the device appearing and getting set up is what is called "enumeration".
bmRequestType - 1 byte (3 bit fields) bRequest - 1 byte selects specific request wValue - 2 bytes value for request wIndex - 2 bytes index or offset for request wLength - 2 bytes count of bytes in data state, if there is one.Note the convention of "b" for a byte value and "w" for a 2 byte word.
Tom's Computer Info / [email protected]