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 di 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_DIRECTION tipizzato archiviato nel membro Packet.bm.Request.Dir della struttura WDF_USB_CONTROL_SETUP_PACKET .

[in] Recipient

Valore WDF_USB_BMREQUEST_RECIPIENT tipizzato 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 usando 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
                                         );

Requisiti

Requisito Valore
Piattaforma di destinazione Universale
Versione KMDF minima 1.0
Versione UMDF minima 2,0
Intestazione wdfusb.h (include Wdfusb.h)

Vedi 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