Condividi tramite


funzione WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR (wdfusb.h)

[Si applica a KMDF e UMDF]

La funzione WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR inizializza una struttura WDF_USB_CONTROL_SETUP_PACKET per un trasferimento di controllo USB specifico del fornitore.

Sintassi

void WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR(
  [out] PWDF_USB_CONTROL_SETUP_PACKET Packet,
  [in]  WDF_USB_BMREQUEST_DIRECTION   Direction,
  [in]  WDF_USB_BMREQUEST_RECIPIENT   Recipient,
  [in]  BYTE                          Request,
  [in]  USHORT                        Value,
  [in]  USHORT                        Index
);

Parametri

[out] Packet

Puntatore a una struttura WDF_USB_CONTROL_SETUP_PACKET.

[in] Direction

Valore WDF_USB_BMREQUEST_DIRECTIONtipizzato archiviato nel membro Packet.bm.Request.Dir della struttura WDF_USB_CONTROL_SETUP_PACKET.

[in] Recipient

Valore WDF_USB_BMREQUEST_RECIPIENT-typed archiviato nel membro Packet.bm.Request.Recipient della struttura WDF_USB_CONTROL_SETUP_PACKET.

[in] Request

Costante del tipo di richiesta archiviata nel membro Packet.bRequest della struttura WDF_USB_CONTROL_SETUP_PACKET.

[in] Value

Valore specifico della richiesta archiviato nel membro Packet.wValue.Value della struttura WDF_USB_CONTROL_SETUP_PACKET.

[in] Index

Valore di indice specifico della richiesta archiviato nel membro Packet.wIndex.Value della struttura WDF_USB_CONTROL_SETUP_PACKET.

Valore restituito

Nessuno

Osservazioni

La funzione WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR esegue le operazioni seguenti:

  • Zeri la struttura WDF_USB_CONTROL_SETUP_PACKET.
  • Imposta il membro Packet.bm.Request.Type su BmRequestVendor.
  • Imposta altri membri della struttura utilizzando gli argomenti di input della funzione WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR.
Per inizializzare una struttura WDF_USB_CONTROL_SETUP_PACKET, il driver deve chiamare una delle funzioni seguenti: Nell'esempio di codice seguente viene inizializzata una struttura WDF_USB_CONTROL_SETUP_PACKET.
WDF_USB_CONTROL_SETUP_PACKET  controlSetupPacket;

WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR(
                                         &controlSetupPacket,
                                         BmRequestHostToDevice,
                                         BmRequestToDevice,
                                         USBFX2LK_REENUMERATE,
                                         0,
                                         0
                                         );

Fabbisogno

Requisito Valore
piattaforma di destinazione Universale
versione minima di KMDF 1.0
versione minima di UMDF 2.0
intestazione wdfusb.h (include Wdfusb.h)

Vedere anche

WDF_USB_BMREQUEST_DIRECTION

WDF_USB_BMREQUEST_RECIPIENT

WDF_USB_CONTROL_SETUP_PACKET

WDF_USB_CONTROL_SETUP_PACKET_INIT

WDF_USB_CONTROL_SETUP_PACKET_INIT_CLASS

WDF_USB_CONTROL_SETUP_PACKET_INIT_FEATURE

WDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUS