arduino-audio-tools
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
UsbSetupPacket Struct Reference

Backend-agnostic mirror of the standard 8-byte USB SETUP packet (TinyUSB's tusb_control_request_t). Identical wire layout on any USB stack. The bmRequestType bitfields (USB 2.0 spec Table 9-2) are exposed as accessor methods instead of a bitfield union, so call sites read almost the same as before: p_request->bmRequestType_bit.type -> p_request.type(). More...

#include <USBAudioBackend.h>

Public Types

enum class  Recipient : uint8_t { Device = 0 , Interface = 1 , Endpoint = 2 , Other = 3 }
 
enum class  Type : uint8_t { Standard = 0 , Class = 1 , Vendor = 2 }
 

Public Member Functions

UsbDir direction () const
 
Recipient recipient () const
 
Type type () const
 

Public Attributes

uint8_t bmRequestType = 0
 
uint8_t bRequest = 0
 
uint16_t wIndex = 0
 
uint16_t wLength = 0
 
uint16_t wValue = 0
 

Detailed Description

Backend-agnostic mirror of the standard 8-byte USB SETUP packet (TinyUSB's tusb_control_request_t). Identical wire layout on any USB stack. The bmRequestType bitfields (USB 2.0 spec Table 9-2) are exposed as accessor methods instead of a bitfield union, so call sites read almost the same as before: p_request->bmRequestType_bit.type -> p_request.type().

Member Enumeration Documentation

◆ Recipient

enum class Recipient : uint8_t
strong
Enumerator
Device 
Interface 
Endpoint 
Other 

◆ Type

enum class Type : uint8_t
strong
Enumerator
Standard 
Class 
Vendor 

Member Function Documentation

◆ direction()

UsbDir direction ( ) const
inline

◆ recipient()

Recipient recipient ( ) const
inline

◆ type()

Type type ( ) const
inline

Member Data Documentation

◆ bmRequestType

uint8_t bmRequestType = 0

◆ bRequest

uint8_t bRequest = 0

◆ wIndex

uint16_t wIndex = 0

◆ wLength

uint16_t wLength = 0

◆ wValue

uint16_t wValue = 0

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