arduino-audio-tools
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions
USBAudioBackend.h File Reference
#include <cstddef>
#include <cstdint>

Go to the source code of this file.

Classes

class  USBAudioBackend
 Abstract seam for every raw USB-stack call the UAC2 driver (USBAudioDeviceBase) needs. Concrete subclasses wrap TinyUSB (USBAudioBackendTinyUSB, today) or a native peripheral driver (STM32 HAL / Renesas USBFS — future work). More...
 
struct  UsbEndpointDescriptorView
 Backend-agnostic mirror of tusb_desc_endpoint_t (USB 2.0 spec Table 9-13). wMaxPacketSize is kept in its raw little-endian form (bits 10..0 = size, bits 12..11 = high-speed additional transactions per microframe) so it round-trips bit-for-bit back into a real endpoint descriptor for backends that need one; use packetSize() for the masked value the UAC2 driver's own sizing logic uses (this mirrors TinyUSB's tu_edpt_packet_size(), which also only masks the low 11 bits and does not apply the HS multiplier). More...
 
struct  UsbInterfaceDescriptorView
 Backend-agnostic mirror of tusb_desc_interface_t — only the fields the UAC2 driver reads (USB 2.0 spec Table 9-12). More...
 
struct  UsbSetupPacket
 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...
 

Namespaces

namespace  audio_tools
 Generic Implementation of sound input and output for desktop environments using portaudio.
 

Enumerations

enum class  UsbDir : uint8_t { Out = 0 , In = 1 }
 USB transfer direction, mirrors TinyUSB's TUSB_DIR_OUT/TUSB_DIR_IN (0/1). More...
 
enum class  UsbSpeed : uint8_t { Full , High , Low , Unknown }
 Device enumerated bus speed, mirrors tusb_speed_t's relevant values. More...
 
enum class  UsbStdRequest : uint8_t { ClearFeature = 1 , GetInterface = 10 , SetInterface = 11 }
 
enum class  UsbXferResult : uint8_t { Success , Failed , Stalled }
 
enum class  UsbXferType : uint8_t { Control = 0 , Isochronous = 1 , Bulk = 2 , Interrupt = 3 }
 USB endpoint transfer type, mirrors tusb_xfer_type_t. More...
 

Functions

UsbEndpointDescriptorView decodeEndpoint (uint8_t const *p)
 
UsbInterfaceDescriptorView decodeInterface (uint8_t const *p)
 
uint8_t const * descNext (uint8_t const *p)
 
uint8_t descSubtype (uint8_t const *p)
 
uint8_t descType (uint8_t const *p)
 
uint16_t descU16 (uint8_t const *p)
 
uint32_t descU32 (uint8_t const *p)