Cypress Semiconductor FX2LP Información técnica Pagina 75

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 460
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 74
Chapter 2. Endpoint Zero Page 2-21
2.3.7 Set Interface
This confusingly-named USB command actually sets
alternate settings
for a specified interface.
USB devices can have multiple concurrent interfaces. For example, a device may have an audio
system that supports different sample rates, and a graphic control panel that supports different lan-
guages. Each interface has a collection of endpoints. Except for endpoint 0, which each interface
uses for device control, endpoints may not be shared between interfaces.
Interfaces may report alternate settings in their descriptors. For example, the audio interface may
have setting 0, 1, and 2 for 8-KHz, 22-KHz, and 44-KHz sample rates. The panel interface may
have settings 0 and 1 for English and Spanish. The Set/Get Interface requests select among the
various alternate settings in an interface.
The firmware should respond to a
Set Interface
request by performing the following steps:
1. Perform the internal operation requested (such as adjusting a sampling rate).
2. Reset the data toggles for every endpoint in the interface.
3. Restore the endpoints to their default conditions, ready to send or accept data. For EP1 IN, for
example, firmware should clear the BUSY bit in the EP1CS register; for EP1OUT, firmware
should load any value into the EP1 byte-count register.
4. Clear the HSNAK bit (
by writing 1 to it
) to terminate the
Set Interface
CONTROL transfer.
Table 2-20. Set Interface (Actually, Set Alternate Setting #AS for Interface #IF)
Byte Field Value Meaning Firmware Response
0 bmRequestType 0x00 OUT, Device
Read and store byte 2 (AS) for
1 bRequest
0x0B
“Set Interface”
Interface #IF, change setting for
2wValueL
AS
Alternate Setting Number
Interface #IF in firmware.
3 wValueH 0x00
4wIndexL IF Interface Number
5 wIndexH 0x00
6 wLengthL 0x00
7 wLengthH 0x00
Vista de pagina 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 459 460

Comentarios a estos manuales

Sin comentarios