
EZ-USB FX2 Technical Reference Manual
Page 2-22 EZ-USB FX2 Technical Reference Manual v2.1
2.3.8 Get Interface
When the host issues the
Get Interface
request, the firmware simply returns the alternate setting
for the requested interface IF and clears the HSNAK bit (by writing 1 to it).
2.3.9 Set Address
When a USB device is first plugged in, it responds to device address 0 until the host assigns it a
unique address using the
Set Address
request. The FX2 copies this device address into the
FNADDR (Function Address) register, then subsequently responds only to requests to this
address. This address is in effect until the USB device is unplugged, the host issues a USB Reset,
or the host powers down.
The FNADDR register is read-only. Whenever the FX2 ReNumerates (see Chapter 3, "Enumer-
ation and ReNumeration™"
), it automatically resets FNADDR to zero, allowing the device to come
back as
new
.
An FX2 program does not need to know the device address, because the FX2 automatically
responds only to the host-assigned FNADDR value. The device address is readable only for
debug/diagnostic purposes.
Table 2-21. Get Interface (Actually, Get Alternate Setting #AS for interface #IF)
Byte Field Value Meaning Firmware Response
0 bmRequestType
0x81
IN, Device
Send AS for Interface #IF over
1 bRequest
0x0A
“Get Interface”
EP0.
2 wValueL 0x00
3 wValueH 0x00
4 wIndexL
IF
Interface Number
5 wIndexH 0x00
6 wLengthL 1 LenL
7 wLengthH
0
LenH
Comentários a estes Manuais