USB::Descriptor Struct Reference

Structure of a USB descriptor. More...

#include <Descriptors.h>

Inheritance diagram for USB::Descriptor:
Collaboration diagram for USB::Descriptor:

Classes

union  Type
 

Public Member Functions

template<typename T >
const T * as () const
 Less clumsy way to cast descriptor to a specific type. More...
 
size_t printTo (Print &p) const
 

Public Attributes

uint8_t length
 Total size (in bytes) including this header. More...
 
uint8_t type
 e.g. TUSB_DESC_STRING More...
 

Detailed Description

Structure of a USB descriptor.

Member Function Documentation

◆ as()

template<typename T >
const T* USB::Descriptor::as ( ) const
inline

Less clumsy way to cast descriptor to a specific type.

Template Parameters
TTinyUSB defines structures beginning with 'tusb_desc_'

◆ printTo()

size_t USB::Descriptor::printTo ( Print p) const

Member Data Documentation

◆ length

uint8_t USB::Descriptor::length

Total size (in bytes) including this header.

◆ type

uint8_t USB::Descriptor::type

e.g. TUSB_DESC_STRING


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