USBDev_AltSettingSet

Description

Set the alternate setting of an interface.

Files

usbdev_api.c

Prototype

void  USBDev_AltSettingSet (HANDLE   dev,
                            UCHAR    if_nbr,
                            UCHAR    alt_set,
                            DWORD   *p_err);


Arguments

dev

General handle to device.

if_nbr

Interface number.

alt_set

Alternate setting number.

p_err

Pointer to variable that will receive the return error code from this function:

ERROR_SUCCESS
ERROR_INVALID_HANDLE
ERROR_INVALID_PARAMETER

Returned Value

None.

Callers

Application.

Notes / Warnings

This function sends a SET_INTERFACE request to the device to set the alternate setting number and updates the one used internally by WinUSB.