libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::USB::SetupPacket Struct Reference

USB 标准请求 SETUP 包(固定8字节) Standard USB setup packet (8 bytes) More...

#include <core.hpp>

Data Fields

uint8_t bmRequestType
 
uint8_t bRequest
 请求码 / Request code (e.g., GET_DESCRIPTOR)
 
uint16_t wValue
 参数字段,含请求相关值 / Value field (e.g., descriptor type/index)
 
uint16_t wIndex
 对象索引,如接口号或端点号 / Index (e.g., interface or endpoint)
 
uint16_t wLength
 数据阶段长度 / Number of bytes in data stage
 

Detailed Description

USB 标准请求 SETUP 包(固定8字节) Standard USB setup packet (8 bytes)

对应 USB 协议中控制传输的第1阶段,用于描述请求类型与参数。 Used in control transfers to carry request and arguments.

Definition at line 56 of file core.hpp.

Field Documentation

◆ bmRequestType

uint8_t LibXR::USB::SetupPacket::bmRequestType

请求类型、方向、目标编码 / Bitmap encoding direction, type, recipient

Definition at line 58 of file core.hpp.

◆ bRequest

uint8_t LibXR::USB::SetupPacket::bRequest

请求码 / Request code (e.g., GET_DESCRIPTOR)

Definition at line 60 of file core.hpp.

◆ wIndex

uint16_t LibXR::USB::SetupPacket::wIndex

对象索引,如接口号或端点号 / Index (e.g., interface or endpoint)

Definition at line 63 of file core.hpp.

◆ wLength

uint16_t LibXR::USB::SetupPacket::wLength

数据阶段长度 / Number of bytes in data stage

Definition at line 64 of file core.hpp.

◆ wValue

uint16_t LibXR::USB::SetupPacket::wValue

参数字段,含请求相关值 / Value field (e.g., descriptor type/index)

Definition at line 62 of file core.hpp.


The documentation for this struct was generated from the following file: