Cypress CyUsb3.sys Programmer\\'s Reference(6)

2019-04-17 14:49

26Cypress CyUsb3.sys Programmer's Reference5.5IOCTL_ADAPT_GET_ALT_INTERFACE_SETTING

Description

This command retrieves the alternate interface setting for a particular interface of the attached device.

A pointer to a byte indicating the interface number is passed as the lpInBuffer parameter to theDeviceIoControl( ) function.

A pointer to a byte into which the alternate interface setting will be reported is passed as the lpOutBufferparameter to the DeviceIoControl( ) function.

The length of the variables (1) is passed in the nInBufferSize and nOutBufferSize parameters.

Example

DWORD dwBytes = 0;UCHAR intfc = 0;UCHAR alt;

DeviceIoControl(hDevice, IOCTL_ADAPT_GET_ALT_INTERFACE_SETTING, &intfc, sizeof (alt), &alt, sizeof (alt), &dwBytes, NULL);

? 2012 Cypress Semiconductor

The IOCTL Interface275.6IOCTL_ADAPT_GET_CURRENT_FRAME

Description

This command returns the current frame number from the host controller driver.

A pointer to a 4-byte variable is passed as both the lpInBuffer and lpOutBuffer parameters to theDeviceIoControl( ) function.

The size of the variable (4) is passed in the nInBufferSize and nOutBufferSize parameters.

Example

DWORD dwBytes = 0;ULONG CurrentFrame;

DeviceIoControl(hDevice, IOCTL_ADAPT_GET_CURRENT_FRAME,

DeviceIoControl(hDevice, IOCTL_ADAPT_GET_CURRENT_FRAME, &CurrentFrame, sizeof (ULONG), &CurrentFrame, sizeof (ULONG), &dwBytes, NULL);

? 2012 Cypress Semiconductor

28Cypress CyUsb3.sys Programmer's Reference5.7IOCTL_ADAPT_GET_DEVICE_NAME

Description

This command retrieves the Product string descriptor value for the attached device.

A pointer to a character buffer is passed as both the lpInBuffer and lpOutBuffer parameters to theDeviceIoControl( ) function.

The length of the buffer is passed in the nInBufferSize and nOutBufferSize parameters.

Example

DWORD dwBytes = 0;ULONG len = 256;

UCHAR *buf = new UCHAR[len];

DeviceIoControl(hDevice, IOCTL_ADAPT_GET_DEVICE_NAME, buf, len, buf, len,

&dwBytes, NULL);

delete[] buf;

? 2012 Cypress Semiconductor

The IOCTL Interface295.8IOCTL_ADAPT_GET_DEVICE_POWER_STATE

Description

This IOCTL is no longer supported. It is available to keep backward compatibility with older interfacelibrary and application.

Microsoft WDF driver framework manages device power state internally.

? 2012 Cypress Semiconductor

30Cypress CyUsb3.sys Programmer's Reference5.9IOCTL_ADAPT_GET_DEVICE_SPEED

Description

This command attempts to report the current operating speed of the USB device. It uses the

IsDeviceHighSpeed routine, but this routine is only supported in Version 1 of the USBD interface.Windows 2K SP4, Windows XP and later all support Version 1 of the USBD interface. If the

IsDeviceHighSpeed routine is not available, DEVICE_SPEED_UNKNOWN is returned. The possiblereturn value of this IOCTL is defined in the cyioctl.h header file.

A pointer to a 4-byte variable is passed as both the lpInBuffer and lpOutBuffer parameters to theDeviceIoControl( ) function.

The size of the variable (4) is passed in the nInBufferSize and nOutBufferSize parameters.

Defines (cyioctl.h)

#define DEVICE_SPEED_UNKNOWN 0x00000000#define DEVICE_SPEED_LOW_FULL 0x00000001#define DEVICE_SPEED_HIGH 0x00000002

#define DEVICE_SPEED_SUPER 0x00000004

Example

DWORD dwBytes = 0;ULONG DevSpeed;

DeviceIoControl(hDevice, IOCTL_ADAPT_GET_DEVICE_SPEED, &DevSpeed, sizeof (ULONG), &DevSpeed, sizeof (ULONG), &dwBytes, NULL);

? 2012 Cypress Semiconductor


Cypress CyUsb3.sys Programmer\\'s Reference(6).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:客户满意度调查方案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: