USBD_STATUS

The USBD_STATUS data type defines USB status values for USB requests.

 
 
typedef LONG USBD_STATUS;


The most significant 4 bits of USB status values are defined in the following table.

Value Meaning

00 (USBD_STATUS_SUCCESS)

Request was completed with success.

01 (USBD_STATUS_PENDING)

Request is pending.

10 or 11 (USBD_STATUS_ERROR)

Request was completed with an error.

 

The least significant 28 bits of USB status values are defined in the following table.

Value Meaning

USBD_STATUS_CRC

CRC error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_BTSTUFF

BTS error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_STALL_PID

The device returned a stall packet identifier (defined for backward compatibility with the USB 1.0)

USBD_STATUS_DEV_NOT_RESPONDING

The device is not responding (defined for backward compatibility with the USB 1.0).

USBD_STATUS_PID_CHECK_FAILURE

The device returned a packet identifier check failure (defined for backward compatibility with the USB 1.0).

USBD_STATUS_UNEXPECTED_PID

The device returned an unexpected packet identifier error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_DATA_OVERRUN

The device returned a data overrun error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_DATA_UNDERRUN

The device returned a data underrun error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_RESERVED1

Reserved.

USBD_STATUS_RESERVED2

Reserved.

USBD_STATUS_BUFFER_OVERRUN

The device returned a buffer overrun error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_BUFFER_UNDERRUN

The device returned a buffer underrun error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_NOT_ACCESSED

The USB stack could not access the device (defined for backward compatibility with the USB 1.0).

USBD_STATUS_FIFO

The device returned a FIFO error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_XACT_ERROR

The device returned a transaction error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_BABBLE_DETECTED

The device returned a babble detected error (defined for backward compatibility with the USB 1.0).

USBD_STATUS_DATA_BUFFER_ERROR

Hardware status codes that range from 0x00000001 to 0x000000FF (defined for backward compatibility with the USB 1.0 stack).

USBD_STATUS_ENDPOINT_HALTED

A transfer was submitted to an endpoint that is stalled.

USBD_STATUS_INVALID_CONFIGURATION_DESCRIPTOR A select configuration request was submitted with an invalid configuration descriptor.

USBD_STATUS_INVALID_URB_FUNCTION

Invalid URB function.

USBD_STATUS_INVALID_PARAMETER

Invalid parameter.

USBD_STATUS_ERROR_BUSY

The client driver caused an error by attempting to close an endpoint, interface, or configuration handle with outstanding transfers.

USBD_STATUS_REQUEST_FAILED

The hub driver cannot complete a URB request.

USBD_STATUS_INVALID_PIPE_HANDLE

Invalid pipe handle.

USBD_STATUS_NO_BANDWIDTH

There was not enough bandwidth to open a requested endpoint.

USBD_STATUS_INTERNAL_HC_ERROR

Unspecified host controller error.

USBD_STATUS_ERROR_SHORT_TRANSFER

The transfer ended with a short packet, but the USBD_SHORT_TRANSFER_OK bit is not set for the pipe.

USBD_STATUS_BAD_START_FRAME

The requested start frame is not within a range of USBD_ISO_START_FRAME_RANGE frames of the current USB frame. Whenever this error occurs, the system sets the stall bit on the pipe.

USBD_STATUS_ISOCH_REQUEST_FAILED

The host controller returns this error whenever all packets in an isochronous transfer complete with an error.

USBD_STATUS_FRAME_CONTROL_OWNED

The hub driver returns this error whenever the frame length control for the host controller is being used by a driver other than the host controller driver.

USBD_STATUS_FRAME_CONTROL_NOT_OWNED

The hub driver returns this error if the caller does not own frame length control and attempts to release or modify the host controller frame length.

USBD_STATUS_NOT_SUPPORTED

The request was not supported.

USBD_STATUS_INAVLID_CONFIGURATION_DESCRIPTOR

Invalid configuration descriptor.

USBD_STATUS_INSUFFICIENT_RESOURCES

Insufficient resources.

USBD_STATUS_SET_CONFIG_FAILED

An attempt to change the device configuration failed.

USBD_STATUS_BUFFER_TOO_SMALL

The buffer is too small.

USBD_STATUS_INTERFACE_NOT_FOUND

The interface was not found.

USBD_STATUS_INAVLID_PIPE_FLAGS

Invalid pipe flags.

USBD_STATUS_TIMEOUT

The request timed out.

USBD_STATUS_DEVICE_GONE

The device is no longer present in the system.

USBD_STATUS_STATUS_NOT_MAPPED

The device bus address is not mapped to system memory.

USBD_STATUS_HUB_INTERNAL_ERROR

The hub driver returns this error whenever it intercepted a URB that was targeted at some other device.

USBD_STATUS_CANCELED

The USB stack reports this error whenever it completed a transfer because of an AbortPipe request from the client driver.

USBD_STATUS_ISO_NOT_ACCESSED_BY_HW

The host controller did not access the transfer descriptor (TD) that is associated with this packet. The USB stack reports this error in the packet status field of an isochronous transfer packet.

USBD_STATUS_ISO_TD_ERROR

The host controller reported an error in the transfer descriptor (TD). The USB stack reports this error in the packet status field of an isochronous transfer packet.

USBD_STATUS_ISO_NA_LATE_USBPORT

The client driver submitted the packet on time, but the packet failed to reach the miniport driver on time. The USB stack reports this error in the packet status field of an isochronous transfer packet.

USBD_STATUS_ISO_NOT_ACCESSED_LATE

The client driver did not submit the packet on time. The USB stack reports this error in the packet status field of an isochronous transfer packet.

USBD_STATUS_BAD_DESCRIPTOR

Invalid descriptor.

USBD_STATUS_BAD_DESCRIPTOR_BLEN

Invalid descriptor length.

USBD_STATUS_BAD_DESCRIPTOR_TYPE

Invalid descriptor type.

USBD_STATUS_BAD_INTERFACE_DESCRIPTOR

Invalid interface descriptor.

USBD_STATUS_BAD_ENDPOINT_DESCRIPTOR

Invalid endpoint descriptor.

USBD_STATUS_BAD_INTERFACE_ASSOC_DESCRIPTOR

Invalid interface association descriptor.

USBD_STATUS_BAD_CONFIG_DESC_LENGTH

Invalid configuration descriptor length.

USBD_STATUS_BAD_NUMBER_OF_INTERFACES

Invalid number of interfaces.

USBD_STATUS_BAD_NUMBER_OF_ENDPOINTS

Invalid number of endpoints.

USBD_STATUS_BAD_ENDPOINT_ADDRESS

Invalid endpoint address.

 

1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
_USBD_HandleTypeDef 是在 USB 设备模式下使用的 HAL 库中定义的一个结构体,它包含了 USB 设备相关的信息和配置。下面是该结构体的详细解释: 1. dev_instance: USB 设备实例号,它是用于区分不同 USB 设备的编号,一个设备对应一个实例。 2. pDevDrv: 指向 USB 设备驱动程序的指针,该驱动程序是由用户自己提供的。 3. pData: 指向 USB 设备数据的指针,该指针指向的数据是由用户自己定义的。 4. status: USB 设备的状态,包括以下几种: - ATTACHED:设备已连接到主机端口上。 - POWERED:设备已被供电。 - SUSPENDED:设备已被挂起。 - RESUMED:设备已被唤醒。 - CONFIGURED:设备已被配置。 5. pControl: 指向控制传输的指针,该指针指向的数据是由用户自己定义的。 6. pConf: 指向配置传输的指针,该指针指向的数据是由用户自己定义的。 7. pInEp: 指向输入端点的指针,该指针指向的数据是由用户自己定义的。 8. pOutEp: 指向输出端点的指针,该指针指向的数据是由用户自己定义的。 9. pClassData: 指向 USB 设备类数据的指针,该指针指向的数据是由用户自己定义的。 10. pUserData: 指向用户数据的指针,该指针指向的数据是由用户自己定义的。 总的来说,_USBD_HandleTypeDef 结构体是 USB 设备模式下 HAL 库的一个重要结构体,它包含了 USB 设备的状态信息、传输控制信息、端点信息、用户数据等重要信息,这些信息都是 HAL 库进行 USB 设备操作的重要依据。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值